summaryrefslogtreecommitdiffstats
path: root/apps/pkeyparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/pkeyparam.c')
-rw-r--r--apps/pkeyparam.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/pkeyparam.c b/apps/pkeyparam.c
index 3722be4bf6..4fefe69e6b 100644
--- a/apps/pkeyparam.c
+++ b/apps/pkeyparam.c
@@ -100,7 +100,8 @@ int pkeyparam_main(int argc, char **argv)
out = bio_open_default(outfile, 'w', FORMAT_PEM);
if (out == NULL)
goto end;
- pkey = PEM_read_bio_Parameters(in, NULL);
+ pkey = PEM_read_bio_Parameters_ex(in, NULL, app_get0_libctx(),
+ app_get0_propq());
if (pkey == NULL) {
BIO_printf(bio_err, "Error reading parameters\n");
ERR_print_errors(bio_err);
@@ -108,7 +109,11 @@ int pkeyparam_main(int argc, char **argv)
}
if (check) {
- ctx = EVP_PKEY_CTX_new(pkey, e);
+ if (e == NULL)
+ ctx = EVP_PKEY_CTX_new_from_pkey(app_get0_libctx(), pkey,
+ app_get0_propq());
+ else
+ ctx = EVP_PKEY_CTX_new(pkey, e);
if (ctx == NULL) {
ERR_print_errors(bio_err);
goto end;