aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPaul Yang <yang.yang@baishancloud.com>2017-07-29 00:24:27 +0800
committerPaul Yang <yang.yang@baishancloud.com>2017-07-29 00:24:27 +0800
commit03883e7e168b0f5ef52a516eeb86346b767e0298 (patch)
tree7506999369f550018c776733649fb51957e2d992 /apps
parent190b9a03b72a8029c27e4bd0ab000129e240a413 (diff)
downloadopenssl-03883e7e168b0f5ef52a516eeb86346b767e0298.tar.gz
Fix rsa -check option
original problem: if a private key is invaild, nothing outputted. the error filter in apps/rsa.c is not working any more. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4043)
Diffstat (limited to 'apps')
-rw-r--r--apps/rsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/rsa.c b/apps/rsa.c
index 5adb93d7f5..ebb02eaf7c 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -217,7 +217,7 @@ int rsa_main(int argc, char **argv)
}
if (check) {
- int r = RSA_check_key(rsa);
+ int r = RSA_check_key_ex(rsa, NULL);
if (r == 1) {
BIO_printf(out, "RSA key ok\n");
@@ -226,7 +226,7 @@ int rsa_main(int argc, char **argv)
while ((err = ERR_peek_error()) != 0 &&
ERR_GET_LIB(err) == ERR_LIB_RSA &&
- ERR_GET_FUNC(err) == RSA_F_RSA_CHECK_KEY &&
+ ERR_GET_FUNC(err) == RSA_F_RSA_CHECK_KEY_EX &&
ERR_GET_REASON(err) != ERR_R_MALLOC_FAILURE) {
BIO_printf(out, "RSA key error: %s\n",
ERR_reason_error_string(err));