Wrap the cause of signature verification errors.
Instead of swallowing the cause of verification errors, we use error wrapping to communicate the cause to the caller.
This commit is contained in:
parent
58dbea76e7
commit
e9fca4d62f
5 changed files with 48 additions and 25 deletions
|
|
@ -303,7 +303,7 @@ func TestMessageVerificationNotSignedNoVerifier(t *testing.T) {
|
|||
|
||||
func TestMessageVerificationNotSignedFailed(t *testing.T) {
|
||||
callbackResults := runScenario(t, "testdata/mime/scenario_13.asc")
|
||||
var expectedErrors = []SignatureVerificationError{newSignatureNotSigned(), newSignatureFailed()}
|
||||
var expectedErrors = []SignatureVerificationError{newSignatureNotSigned(), newSignatureFailed(nil)}
|
||||
compareErrors(expectedErrors, callbackResults.onError, t)
|
||||
expectedStatus := []int{3}
|
||||
compareStatus(expectedStatus, callbackResults.onVerified, t)
|
||||
|
|
@ -335,7 +335,7 @@ func TestMessageVerificationNoVerifierNoVerifier(t *testing.T) {
|
|||
|
||||
func TestMessageVerificationNoVerifierFailed(t *testing.T) {
|
||||
callbackResults := runScenario(t, "testdata/mime/scenario_23.asc")
|
||||
var expectedErrors = []SignatureVerificationError{newSignatureNoVerifier(), newSignatureFailed()}
|
||||
var expectedErrors = []SignatureVerificationError{newSignatureNoVerifier(), newSignatureFailed(nil)}
|
||||
compareErrors(expectedErrors, callbackResults.onError, t)
|
||||
expectedStatus := []int{3}
|
||||
compareStatus(expectedStatus, callbackResults.onVerified, t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue