mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 01:48:15 +03:00
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:
parent
e5eaf4d46f
commit
eb88e2651a
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user