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:
72f6453
)
PR: 1840
author
Dr. Stephen Henson
<steve@openssl.org>
Sat, 14 Feb 2009 22:19:31 +0000
(22:19 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sat, 14 Feb 2009 22:19:31 +0000
(22:19 +0000)
Submitted by: Martin Kaiser <lists@kaiser.cx>
Approved by: steve@openssl.org
Handle NULL passing in parameter and BN_CTX_new() error correctly.
crypto/rsa/rsa_x931g.c
patch
|
blob
|
history
diff --git
a/crypto/rsa/rsa_x931g.c
b/crypto/rsa/rsa_x931g.c
index c640cc2ec9ed6bd9db4161007090fd3ac3f0a3bd..bf94f8be7a0333be6c1ce01edd27850dfa4ef45a 100644
(file)
--- a/
crypto/rsa/rsa_x931g.c
+++ b/
crypto/rsa/rsa_x931g.c
@@
-79,9
+79,9
@@
int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2,
goto err;
ctx = BN_CTX_new();
- BN_CTX_start(ctx);
if (!ctx)
goto err;
+ BN_CTX_start(ctx);
r0 = BN_CTX_get(ctx);
r1 = BN_CTX_get(ctx);
@@
-190,7
+190,7
@@
int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2,
if (ctx2)
BN_CTX_free(ctx2);
/* If this is set all calls successful */
- if (rsa->iqmp != NULL)
+ if (rsa
&& rsa
->iqmp != NULL)
return 1;
return 0;