Skip to content

Commit d703f49

Browse files
authored
Check binding signature details against primary key (#264)
Rather than checking the binding signature details against the subkey (i.e. the subject of the binding signature), check them against the primary key (i.e. the signing key).
1 parent 72cacd5 commit d703f49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openpgp/v2/subkeys.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (s *Subkey) LatestValidBindingSignature(date time.Time, config *packet.Conf
187187
if sig.Valid == nil {
188188
err := s.Primary.PrimaryKey.VerifyKeySignature(s.PublicKey, sig.Packet)
189189
if err == nil {
190-
err = checkSignatureDetails(s.PublicKey, sig.Packet, date, config)
190+
err = checkSignatureDetails(s.Primary.PrimaryKey, sig.Packet, date, config)
191191
}
192192
valid := err == nil
193193
sig.Valid = &valid

0 commit comments

Comments
 (0)