diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-11-07 16:15:20 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-11-09 16:09:23 +0100 |
commit | 534e5fabadb18901daeff79f3a450d1b612880bd (patch) | |
tree | 1d7c5fd417e6e40b96885f261aedff15357c1b35 /crypto/rsa/rsa_chk.c | |
parent | modes/asm/ghash-alpha.pl: make it work with older assembler for real. (diff) | |
download | openssl-534e5fabadb18901daeff79f3a450d1b612880bd.tar.xz openssl-534e5fabadb18901daeff79f3a450d1b612880bd.zip |
Check for missing components in RSA_check.
Diffstat (limited to 'crypto/rsa/rsa_chk.c')
-rw-r--r-- | crypto/rsa/rsa_chk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_chk.c b/crypto/rsa/rsa_chk.c index 9d848db8c6..cc30e77132 100644 --- a/crypto/rsa/rsa_chk.c +++ b/crypto/rsa/rsa_chk.c @@ -59,6 +59,12 @@ int RSA_check_key(const RSA *key) BN_CTX *ctx; int r; 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(); j = BN_new(); |