diff options
author | Richard Levitte <levitte@openssl.org> | 2001-06-19 16:34:53 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-06-19 16:34:53 +0000 |
commit | 6dcd1c91092b19b9492e2719c899d4e34bbeaf32 (patch) | |
tree | b9aa0d83c8d3f889475e0354fd630e667add42c0 /apps/genrsa.c | |
parent | 2fe5adc36c005b83615ed61e96ea70c0628f42eb (diff) |
Do a proof of concept. "openssl genrsa" will make the name of the
file part of the password prompt unless it's standard input...
More will be added...
Diffstat (limited to 'apps/genrsa.c')
-rw-r--r-- | apps/genrsa.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/genrsa.c b/apps/genrsa.c index 5d7fca404d..dfcb523eba 100644 --- a/apps/genrsa.c +++ b/apps/genrsa.c @@ -226,8 +226,14 @@ bad: l+=rsa->e->d[i]; } BIO_printf(bio_err,"e is %ld (0x%lX)\n",l,l); - if (!PEM_write_bio_RSAPrivateKey(out,rsa,enc,NULL,0,NULL, passout)) + { + PW_CB_DATA cb_data; + cb_data.password = passout; + cb_data.prompt_info = outfile; + if (!PEM_write_bio_RSAPrivateKey(out,rsa,enc,NULL,0, + (pem_password_cb *)password_callback,&cb_data)) goto err; + } ret=0; err: |