summaryrefslogtreecommitdiffstats
path: root/providers/implementations/rands/drbg.c
diff options
context:
space:
mode:
authorafshinpir <afshinpir@users.noreply.github.com>2023-03-08 20:31:54 +1300
committerPauli <pauli@openssl.org>2023-03-15 08:28:39 +1100
commita3207163ef3d30658a41a9c9e3750ca4c5b16677 (patch)
treea89c9b3e4ff93362b7a15d5f323b272481bbf656 /providers/implementations/rands/drbg.c
parent559e078d94f1213318105b03f4e88b848fc28314 (diff)
Updated `rsa_has()` for correct validation
CLA: trivial In RSA, `(n,e)` and `(n,d)` identify public key and private key. Modulus `n` is the common part. So I updated `rsa_has()` to validate these pairs correctly. `OSSL_KEYMGMT_SELECT_KEYPAIR` is common part for both public and private key, so I changed it to check `n` of RSA and for `OSSL_KEYMGMT_SELECT_PUBLIC_KEY`, `e` is checked. Before this change, if `selection` was `OSSL_KEYMGMT_SELECT_PRIVATE_KEY` and only `e` and `d` was in the RSA structure, the function returns 1 while it was incorrect. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20455)
Diffstat (limited to 'providers/implementations/rands/drbg.c')
0 files changed, 0 insertions, 0 deletions