Make an error message less verbose
This commit is contained in:
parent
61b6c3bf2a
commit
d0f48efa91
|
@ -97,7 +97,7 @@ func getEntriesFull(ctx context.Context, client ctclient.Log, startInclusive, en
|
||||||
func getAndVerifySTH(ctx context.Context, ctlog *loglist.Log, client ctclient.Log) (*cttypes.SignedTreeHead, string, error) {
|
func getAndVerifySTH(ctx context.Context, ctlog *loglist.Log, client ctclient.Log) (*cttypes.SignedTreeHead, string, error) {
|
||||||
sth, url, err := client.GetSTH(ctx)
|
sth, url, err := client.GetSTH(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", fmt.Errorf("error getting STH: %w", err)
|
return nil, "", err
|
||||||
}
|
}
|
||||||
if err := ctcrypto.PublicKey(ctlog.Key).Verify(ctcrypto.SignatureInputForSTH(sth), sth.Signature); err != nil {
|
if err := ctcrypto.PublicKey(ctlog.Key).Verify(ctcrypto.SignatureInputForSTH(sth), sth.Signature); err != nil {
|
||||||
return nil, "", fmt.Errorf("STH has invalid signature: %w", err)
|
return nil, "", fmt.Errorf("STH has invalid signature: %w", err)
|
||||||
|
|
Loading…
Reference in New Issue