Skip to content

Commit 8c5545f

Browse files
authored
fix: (verify,decrypt) using isSigned to validate instead of SignedBy (#42)
1 parent dad939b commit 8c5545f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

openpgp/decrypt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (o *FastOpenPGP) decrypt(reader io.Reader, privateKey, passphrase string, s
6868
return nil, fmt.Errorf("signature error: %w", md.SignatureError)
6969
}
7070

71-
if md.SignedBy == nil {
71+
if !md.IsSigned {
7272
return nil, errors.New("message is not signed")
7373
}
7474

openpgp/verify.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (o *FastOpenPGP) verifyDataBytes(signedData io.Reader, publicKey string, sh
8686
return false, fmt.Errorf("invalid read message: %w", err)
8787
}
8888

89-
if md.SignedBy == nil {
89+
if !md.IsSigned {
9090
return false, errors.New("message was not signed")
9191
}
9292

0 commit comments

Comments
 (0)