Check for missing components in RSA_check.
(cherry picked from commit 01be36ef70525e81fc358d2e559bdd0a0d9427a5)
This commit is contained in:
parent
62c2b6d944
commit
0ec1a77891
@ -59,6 +59,12 @@ int RSA_check_key(const RSA *key)
|
|||||||
BN_CTX *ctx;
|
BN_CTX *ctx;
|
||||||
int r;
|
int r;
|
||||||
int ret=1;
|
int ret=1;
|
||||||
|
|
||||||
|
if (!key->p || !key->q || !key->n || !key->e || !key->d)
|
||||||
|
{
|
||||||
|
RSAerr(RSA_F_RSA_CHECK_KEY, RSA_R_VALUE_MISSING);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
i = BN_new();
|
i = BN_new();
|
||||||
j = BN_new();
|
j = BN_new();
|
||||||
|
Loading…
Reference in New Issue
Block a user