dkim: add reference to rfc that says not to accept rsa keys < 1024 bits

saw it mentioned on HN recently
This commit is contained in:
Mechiel Lukkien 2025-01-13 10:35:25 +01:00
parent e5eaf4d46f
commit eb88e2651a
No known key found for this signature in database

View file

@ -548,7 +548,7 @@ func verifySignatureRecord(r *Record, sig *Sig, hash crypto.Hash, canonHeaderSim
if r.PublicKey == nil {
return StatusPermerror, ErrKeyRevoked
} else if rsaKey, ok := r.PublicKey.(*rsa.PublicKey); ok && rsaKey.N.BitLen() < 1024 {
// todo: find a reference that supports this.
// ../rfc/8301:157
return StatusPermerror, ErrWeakKey
}