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:
220bd84
)
Update from 1.0.0-stable
author
Dr. Stephen Henson
<steve@openssl.org>
Mon, 6 Apr 2009 21:42:37 +0000
(21:42 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Mon, 6 Apr 2009 21:42:37 +0000
(21:42 +0000)
apps/genrsa.c
patch
|
blob
|
history
diff --git
a/apps/genrsa.c
b/apps/genrsa.c
index 1599bb7a69d6472bad3bf80cd7ccc78fbbf58dcf..a9f40e8adfb3edf1e24eaa69f818adc1ebac1bdf 100644
(file)
--- a/
apps/genrsa.c
+++ b/
apps/genrsa.c
@@
-105,9
+105,9
@@
int MAIN(int argc, char **argv)
char *inrand=NULL;
BIO *out=NULL;
BIGNUM *bn = BN_new();
- RSA *rsa =
RSA_new()
;
+ RSA *rsa =
NULL
;
- if(!bn
|| !rsa
) goto err;
+ if(!bn) goto err;
apps_startup();
BN_GENCB_set(&cb, genrsa_cb, bio_err);
@@
-266,6
+266,10
@@
bad:
BIO_printf(bio_err,"Generating RSA private key, %d bit long modulus\n",
num);
+ rsa = RSA_new();
+ if (!rsa)
+ goto err;
+
if(!BN_set_word(bn, f4) || !RSA_generate_key_ex(rsa, num, bn, &cb))
goto err;