Fix signature status when verifying unsigned message
Return `SIGNATURE_NOT_SIGNED` instead of `SIGNATURE_NO_VERIFIER` when verifying a messages with no embedded signatures.
This commit is contained in:
parent
f4ccc63c40
commit
77df8cba3d
3 changed files with 13 additions and 3 deletions
|
|
@ -85,7 +85,7 @@ func TestMobileSignedMessageDecryptionWithSessionKey(t *testing.T) {
|
|||
t.Fatal("Expected no error when decrypting, got:", err)
|
||||
}
|
||||
|
||||
assert.Exactly(t, constants.SIGNATURE_NO_VERIFIER, decrypted.SignatureVerificationError.Status)
|
||||
assert.Exactly(t, constants.SIGNATURE_NOT_SIGNED, decrypted.SignatureVerificationError.Status)
|
||||
assert.Exactly(t, message.GetString(), decrypted.Message.GetString())
|
||||
|
||||
publicKey, _ = crypto.NewKeyFromArmored(readTestFile("keyring_publicKey", false))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue