mirror of
https://github.com/SSLMate/certspotter.git
synced 2025-06-27 10:15:33 +02:00
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…
x
Reference in New Issue
Block a user