Add API to add contexts to detached signatures.
Using the notation data packets of signatures, we add a way to set a context to detached signatures. We also add a way to enforce that signatures have the right context during verification.
This commit is contained in:
parent
3152e50f92
commit
1ec90e34ea
10 changed files with 614 additions and 19 deletions
14
CHANGELOG.md
14
CHANGELOG.md
|
|
@ -5,13 +5,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
# Changed
|
||||
|
||||
### Added
|
||||
- API for adding context to detached signatures:
|
||||
```go
|
||||
sig, err := keyRing.SignDetachedWithContext(message, context)
|
||||
```
|
||||
- API to verify the context of detached signatures:
|
||||
```go
|
||||
err := keyRing.VerifyDetachedWithContext(message, signature, verifyTime, verificationContext)
|
||||
```
|
||||
### Changed
|
||||
- Update `github.com/ProtonMail/go-crypto` to the latest version
|
||||
- More strictly verify detached signatures: reject detached signatures from revoked and expired keys.
|
||||
- In `GetVerifiedSignatureTimestamp`, use the new `VerifyDetachedSignatureAndHash` function to get the verified signature, instead of parsing the signature packets manually to get the timestamp.
|
||||
|
||||
## [2.5.2] 2022-01-25
|
||||
# Changed
|
||||
### Changed
|
||||
- Update `github.com/ProtonMail/go-crypto` to the latest version
|
||||
|
||||
## [2.5.1] 2022-01-24
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue