Skip to content

Commit 8fe0e95

Browse files
committed
feat(v2): Tolerate invalid key signatures if one passes
1 parent 70930d7 commit 8fe0e95

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

openpgp/v2/keys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ func (e *Entity) LatestValidDirectSignature(date time.Time, config *packet.Confi
731731
if selectedSig == nil {
732732
return nil, errors.StructuralError("no valid direct key signature found")
733733
}
734-
return
734+
return selectedSig, nil
735735
}
736736

737737
// PrimarySelfSignature searches the entity for the self-signature that stores key preferences.

openpgp/v2/subkeys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,5 @@ func (s *Subkey) LatestValidBindingSignature(date time.Time, config *packet.Conf
206206
if selectedSig == nil {
207207
return nil, errors.StructuralError("no valid binding signature found for subkey")
208208
}
209-
return
209+
return selectedSig, nil
210210
}

openpgp/v2/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,5 +219,5 @@ func (i *Identity) LatestValidSelfCertification(date time.Time, config *packet.C
219219
if selectedSig == nil {
220220
return nil, errors.StructuralError("no valid certification signature found for identity")
221221
}
222-
return
222+
return selectedSig, nil
223223
}

0 commit comments

Comments
 (0)