mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 10:00:52 +02:00
Rust wrapper: verify RSA lengths in verifying_key()
This commit is contained in:
@@ -336,6 +336,9 @@ impl<H: Hash, const N: usize> Keypair for SigningKey<H, N> {
|
||||
if rc != 0 {
|
||||
panic!("wc_RsaFlattenPublicKey failed: {rc}");
|
||||
}
|
||||
if (n_len as usize) != N || e_len == 0 || (e_len as usize) > MAX_E_LEN {
|
||||
panic!("wc_RsaFlattenPublicKey failed: e_len: {e_len}, n_len: {n_len}");
|
||||
}
|
||||
VerifyingKey {
|
||||
n,
|
||||
e,
|
||||
|
||||
Reference in New Issue
Block a user