aboutsummaryrefslogtreecommitdiff
path: root/descriptor
diff options
context:
space:
mode:
Diffstat (limited to 'descriptor')
-rw-r--r--descriptor/descriptor.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/descriptor/descriptor.go b/descriptor/descriptor.go
index 267a401..1879cd8 100644
--- a/descriptor/descriptor.go
+++ b/descriptor/descriptor.go
@@ -53,10 +53,7 @@ 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
+// Key parses the log's public key
+func (l *Log) Key() (crypto.PublicKey, error) {
+ return x509.ParsePKIXPublicKey(l.PublicKey)
}