aboutsummaryrefslogtreecommitdiff
path: root/client/add-entry/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/add-entry/main.go')
-rw-r--r--client/add-entry/main.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/client/add-entry/main.go b/client/add-entry/main.go
index 9047529..60fabf8 100644
--- a/client/add-entry/main.go
+++ b/client/add-entry/main.go
@@ -6,8 +6,6 @@ import (
"fmt"
"encoding/base64"
- "encoding/json"
- "io/ioutil"
"net/http"
"github.com/golang/glog"
@@ -62,21 +60,17 @@ func params() ([]byte, []byte, error) {
func setup() (*client.Client, error) {
c, err := stfe.LoadChain(*chain)
if err != nil {
- return nil, fmt.Errorf("failed loading certificate chain: %v", err)
+ return nil, err
}
k, err := stfe.LoadEd25519SigningKey(*key)
if err != nil {
- return nil, fmt.Errorf("failed loading key: %v", err)
+ return nil, err
}
- blob, err := ioutil.ReadFile(*operators)
+ ops, err := descriptor.LoadOperators(*operators)
if err != nil {
- return nil, fmt.Errorf("failed reading log operators: %v", err)
- }
- var ops []descriptor.Operator
- if err := json.Unmarshal(blob, &ops); err != nil {
- return nil, fmt.Errorf("failed decoding log operators: %v", err)
+ return nil, err
}
id, err := base64.StdEncoding.DecodeString(*logId)