mirror of
https://github.com/mjl-/mox.git
synced 2025-01-29 23:55:59 +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
1 changed files with 1 additions and 1 deletions
|
@ -548,7 +548,7 @@ func verifySignatureRecord(r *Record, sig *Sig, hash crypto.Hash, canonHeaderSim
|
||||||
if r.PublicKey == nil {
|
if r.PublicKey == nil {
|
||||||
return StatusPermerror, ErrKeyRevoked
|
return StatusPermerror, ErrKeyRevoked
|
||||||
} else if rsaKey, ok := r.PublicKey.(*rsa.PublicKey); ok && rsaKey.N.BitLen() < 1024 {
|
} 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
|
return StatusPermerror, ErrWeakKey
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue