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:
marin thiercelin 2021-07-15 18:56:15 +02:00
parent f4ccc63c40
commit 77df8cba3d
No known key found for this signature in database
GPG key ID: 117C025B1F21B2C6
3 changed files with 13 additions and 3 deletions

View file

@ -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))