Skip to content

Commit

Permalink
Only apply randomization to less than version six
Browse files Browse the repository at this point in the history
  • Loading branch information
lubux committed Jun 24, 2024
1 parent e3a3edc commit 4477c15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openpgp/packet/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err e
}
sig.Version = priv.PublicKey.Version
sig.IssuerFingerprint = priv.PublicKey.Fingerprint
if priv.Version != 6 && config.RandomizeSignaturesViaNotation() {
if sig.Version < 6 && config.RandomizeSignaturesViaNotation() {
sig.removeNotationsWithName(SaltNotationName)
salt, err := SignatureSaltForHash(sig.Hash, config.Random())
if err != nil {
Expand Down

0 comments on commit 4477c15

Please sign in to comment.