From 118cc34ef1764eb0cddb20f23b9d0f288460f958 Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Wed, 15 Jan 2025 16:13:04 +0100 Subject: [PATCH] Check cross-signature details when signing/certifying --- openpgp/v2/subkeys.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpgp/v2/subkeys.go b/openpgp/v2/subkeys.go index 3e9fc189..6dfd2e54 100644 --- a/openpgp/v2/subkeys.go +++ b/openpgp/v2/subkeys.go @@ -189,6 +189,9 @@ func (s *Subkey) LatestValidBindingSignature(date time.Time, config *packet.Conf if err == nil { err = checkSignatureDetails(s.Primary.PrimaryKey, sig.Packet, date, config) } + if err == nil && (sig.Packet.FlagCertify || sig.Packet.FlagSign || sig.Packet.FlagAuthenticate) { + err = checkSignatureDetails(s.PublicKey, sig.Packet.EmbeddedSignature, date, config) + } valid := err == nil sig.Valid = &valid }