projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3344649
)
Check for missing components in RSA_check.
author
Dr. Stephen Henson
<steve@openssl.org>
Thu, 7 Nov 2013 15:15:20 +0000
(15:15 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sat, 9 Nov 2013 15:09:23 +0000
(15:09 +0000)
crypto/rsa/rsa_chk.c
patch
|
blob
|
history
diff --git
a/crypto/rsa/rsa_chk.c
b/crypto/rsa/rsa_chk.c
index 9d848db8c6c783f8718d86a0b86bbae2bb3f967d..cc30e77132fafdf05cf49455c34087982965f9fc 100644
(file)
--- 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();