提交 6dcd1c91 编写于 作者: R Richard Levitte

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...
上级 2fe5adc3
...@@ -226,8 +226,14 @@ bad: ...@@ -226,8 +226,14 @@ bad:
l+=rsa->e->d[i]; l+=rsa->e->d[i];
} }
BIO_printf(bio_err,"e is %ld (0x%lX)\n",l,l); 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; goto err;
}
ret=0; ret=0;
err: err:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册