version 1.15, 2019/07/14 03:30:46 |
version 1.16, 2019/07/16 12:50:30 |
|
|
goto err; |
goto err; |
} |
} |
|
|
if ((numbits != NULL) && ((sscanf(numbits, "%d", &num) == 0) || (num < 0))) { |
if ((numbits != NULL) && |
|
((sscanf(numbits, "%d", &num) == 0) || (num < 0))) { |
genrsa_usage(); |
genrsa_usage(); |
goto err; |
goto err; |
} |
} |
|
|
if (!app_passwd(bio_err, NULL, genrsa_config.passargout, NULL, &passout)) { |
if (!app_passwd(bio_err, NULL, genrsa_config.passargout, NULL, |
|
&passout)) { |
BIO_printf(bio_err, "Error getting password\n"); |
BIO_printf(bio_err, "Error getting password\n"); |
goto err; |
goto err; |
} |
} |
|
|
if (!rsa) |
if (!rsa) |
goto err; |
goto err; |
|
|
if (!BN_set_word(bn, genrsa_config.f4) || !RSA_generate_key_ex(rsa, num, bn, &cb)) |
if (!BN_set_word(bn, genrsa_config.f4) || |
|
!RSA_generate_key_ex(rsa, num, bn, &cb)) |
goto err; |
goto err; |
|
|
/* |
/* |
|
|
PW_CB_DATA cb_data; |
PW_CB_DATA cb_data; |
cb_data.password = passout; |
cb_data.password = passout; |
cb_data.prompt_info = genrsa_config.outfile; |
cb_data.prompt_info = genrsa_config.outfile; |
if (!PEM_write_bio_RSAPrivateKey(out, rsa, genrsa_config.enc, NULL, 0, |
if (!PEM_write_bio_RSAPrivateKey(out, rsa, genrsa_config.enc, |
password_callback, &cb_data)) |
NULL, 0, password_callback, &cb_data)) |
goto err; |
goto err; |
} |
} |
|
|