summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_chk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_chk.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_chk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_chk.c b/src/lib/libcrypto/rsa/rsa_chk.c
index 9d848db8c6..cc30e77132 100644
--- a/src/lib/libcrypto/rsa/rsa_chk.c
+++ b/src/lib/libcrypto/rsa/rsa_chk.c
@@ -59,6 +59,12 @@ int RSA_check_key(const RSA *key)
59 BN_CTX *ctx; 59 BN_CTX *ctx;
60 int r; 60 int r;
61 int ret=1; 61 int ret=1;
62
63 if (!key->p || !key->q || !key->n || !key->e || !key->d)
64 {
65 RSAerr(RSA_F_RSA_CHECK_KEY, RSA_R_VALUE_MISSING);
66 return 0;
67 }
62 68
63 i = BN_new(); 69 i = BN_new();
64 j = BN_new(); 70 j = BN_new();