Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: return error if verifySignature fail #149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guilhem
Copy link

@guilhem guilhem commented Oct 3, 2021

This prevent hard plumbing and to only use io.Reader interface with
security.

Signed-off-by: Guilhem Lettron guilhem@barpilot.io

This prevent hard plumbing and to only use io.Reader interface with
security.
VerifySignature() doesn't return error if verifyKeyRing isn't specified.

Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
@@ -174,8 +177,6 @@ func (msg *PlainMessageReader) VerifySignature() (err error) {
if msg.verifyKeyRing != nil {
processSignatureExpiration(msg.details, msg.verifyTime)
err = verifyDetailsSignature(msg.details, msg.verifyKeyRing)
} else {
err = errors.New("gopenpgp: no verify keyring was provided before decryption")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API is such that if the caller sets the verification key ring to nil, the library should not do any verification. So I don't think we need an error here.

@lubux lubux added the v2 Targeting GopenPGP v2 label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Targeting GopenPGP v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants