Skip to content

Commit

Permalink
Merge pull request #12 from ryan-lang/better-error-msg
Browse files Browse the repository at this point in the history
better error messages when verify fails (which cert failed?)
  • Loading branch information
alvinbaena authored Nov 18, 2023
2 parents 72d70e1 + e28142d commit 7956710
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func LoadSigningInformationFromBytes(pkcs12KeyStoreFile []byte, keyStorePassword
}

if err := verify(cer); err != nil {
return nil, err
return nil, fmt.Errorf("error decoding pkcs12: %w", err)
}

wwdrca, err := x509.ParseCertificate(appleWWDRCAFile)
Expand All @@ -61,7 +61,7 @@ func LoadSigningInformationFromBytes(pkcs12KeyStoreFile []byte, keyStorePassword
}

if err := verify(wwdrca); err != nil {
return nil, err
return nil, fmt.Errorf("error verifying Apple WWDRCAFile: %w", err)
}

info.privateKey = pk
Expand Down

0 comments on commit 7956710

Please sign in to comment.