From 1fc964732bec66501a20a3e500d4389d8441e870 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Fri, 3 Jun 2016 08:10:38 -0700 Subject: [PATCH] Allow public key to be omitted from log JSON file In which case signatures are not checked. --- logs.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/logs.go b/logs.go index fa01456..1d84032 100644 --- a/logs.go +++ b/logs.go @@ -30,7 +30,11 @@ func (info *LogInfo) FullURI () string { } func (info *LogInfo) ParsedPublicKey () (crypto.PublicKey, error) { - return x509.ParsePKIXPublicKey(info.Key) + if info.Key != nil { + return x509.ParsePKIXPublicKey(info.Key) + } else { + return nil, nil + } } var DefaultLogs = []LogInfo{