diff options
Diffstat (limited to 'server/descriptor')
| -rw-r--r-- | server/descriptor/descriptor.go | 10 | 
1 files changed, 10 insertions, 0 deletions
| 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 +} | 
