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

@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Changed
- Changed the returned `SignatureVerificationError.Status` when trying to verify a message with no embedded signature. It used to return `constants.SIGNATURE_NO_VERIFIER` and now returns `constants.SIGNATURE_NOT_SIGNED`.
This change impacts :
- `func (sk *SessionKey) DecryptAndVerify(...)`
- `func (msg *PlainMessageReader) VerifySignature(...)`
- `func (keyRing *KeyRing) Decrypt(...)`
### Added
- Helper to access the SignatureVerificationError explicitly when decrypting streams in mobile apps:
```go