From 9ab61d6884a9ac26592723523ed2521c79c47a1a Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Tue, 3 Nov 2020 13:17:11 +0100 Subject: fixed signature verification and client get-sth --- server/descriptor/descriptor.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server') diff --git a/server/descriptor/descriptor.go b/server/descriptor/descriptor.go index 6e46790..295e03f 100644 --- a/server/descriptor/descriptor.go +++ b/server/descriptor/descriptor.go @@ -4,7 +4,9 @@ import ( "bytes" "fmt" + "crypto" "crypto/tls" + "crypto/x509" "encoding/base64" "encoding/json" "io/ioutil" @@ -55,3 +57,11 @@ func LoadOperators(path string) ([]Operator, error) { } return ops, nil } + +func (l *Log) Key() crypto.PublicKey { + k, err := x509.ParsePKIXPublicKey(l.PublicKey) + if err != nil { + panic("TODO: make a new function and parse public key there") + } + return k +} -- cgit v1.2.3