Allow public key to be omitted from log JSON file

In which case signatures are not checked.
This commit is contained in:
Andrew Ayer 2016-06-03 08:10:38 -07:00
parent 2c8cb1f402
commit 1fc964732b
1 changed files with 5 additions and 1 deletions

View File

@ -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{