aboutsummaryrefslogtreecommitdiff
path: root/type.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-27 15:16:24 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-27 15:16:24 +0100
commitdd19521190f39a8b1704adb724f5f812040f91e4 (patch)
treeec39c578f5272d708276956b4bcd251d2e9ea0b0 /type.go
parentd90eed44990f34a87c286ee21f5579506143040d (diff)
decoupled log instance and info
Makes things a bit more modular. As part of this process I also replaced ct/x509 with crypto/x509, which already suits our needs.
Diffstat (limited to 'type.go')
-rw-r--r--type.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/type.go b/type.go
index f691f34..a629259 100644
--- a/type.go
+++ b/type.go
@@ -3,10 +3,10 @@ package stfe
import (
"fmt"
+ "crypto/x509"
"encoding/base64"
"github.com/google/certificate-transparency-go/tls"
- "github.com/google/certificate-transparency-go/x509"
"github.com/google/trillian"
)
@@ -140,8 +140,8 @@ func StItemFromB64(s string) (StItem, error) {
// Appendix is extra data that Trillian can store about a leaf
type Appendix struct {
- Signature []byte `tls:"minlen:0,maxlen:16383"`
- Chain []RawCertificate `tls:"minlen:0,maxlen:65535"`
+ Signature []byte `tls:"minlen:0,maxlen:16383"`
+ Chain []RawCertificate `tls:"minlen:0,maxlen:65535"`
}
// RawCertificate is a serialized X.509 certificate
@@ -153,7 +153,7 @@ type RawCertificate struct {
func NewAppendix(x509Chain []*x509.Certificate, signature []byte) Appendix {
chain := make([]RawCertificate, 0, 2) // TODO: base length on config param
for _, c := range x509Chain {
- chain = append(chain, RawCertificate{ c.Raw })
+ chain = append(chain, RawCertificate{c.Raw})
}
- return Appendix{ Signature: signature, Chain: chain }
+ return Appendix{Signature: signature, Chain: chain}
}