diff options
Diffstat (limited to 'client/get-consistency-proof')
-rw-r--r-- | client/get-consistency-proof/main.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/get-consistency-proof/main.go b/client/get-consistency-proof/main.go index 72fa804..acf116e 100644 --- a/client/get-consistency-proof/main.go +++ b/client/get-consistency-proof/main.go @@ -28,11 +28,16 @@ func main() { glog.Fatal(err) } + k, err := cli.Log.Key() + if err != nil { + glog.Fatalf("bad public key: %v", err) + } + var sth1 stfe.StItem if err := sth1.UnmarshalB64(*first); err != nil { glog.Fatalf("bad signed tree head: %v", err) } - if err := client.VerifySignedTreeHeadV1(&sth1, cli.Log.Scheme, cli.Log.Key()); err != nil { + if err := client.VerifySignedTreeHeadV1(&sth1, cli.Log.Scheme, k); err != nil { glog.Fatalf("bad signed tree head: %v", err) } glog.V(3).Info("verified first sth") @@ -41,7 +46,7 @@ func main() { if err := sth2.UnmarshalB64(*second); err != nil { glog.Fatalf("bad signed tree head: %v", err) } - if err := client.VerifySignedTreeHeadV1(&sth2, cli.Log.Scheme, cli.Log.Key()); err != nil { + if err := client.VerifySignedTreeHeadV1(&sth2, cli.Log.Scheme, k); err != nil { glog.Fatalf("bad signed tree head: %v", err) } glog.V(3).Info("verified second sth") |