summaryrefslogtreecommitdiffstats
path: root/demos/pkcs12
diff options
context:
space:
mode:
authorning <xiaofu.ning@ingeek.com>2020-03-11 15:28:05 +0800
committerPauli <paul.dale@oracle.com>2020-03-13 07:30:33 +1000
commit98bdae6a04f7467243e44a29663e91e1bd846af3 (patch)
tree8d8bbc29283de8f916a8a19d146d26432d95e874 /demos/pkcs12
parentf11a74ef79d3944844593d8d76d43f048bdb709d (diff)
pkcs12 demo: output correct file names on error.
CLA: Trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11304)
Diffstat (limited to 'demos/pkcs12')
-rw-r--r--demos/pkcs12/pkread.c2
-rw-r--r--demos/pkcs12/pkwrite.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/demos/pkcs12/pkread.c b/demos/pkcs12/pkread.c
index 33fba5d290..d29ab98a60 100644
--- a/demos/pkcs12/pkread.c
+++ b/demos/pkcs12/pkread.c
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
name = find_friendly_name(p12);
PKCS12_free(p12);
if ((fp = fopen(argv[3], "w")) == NULL) {
- fprintf(stderr, "Error opening file %s\n", argv[1]);
+ fprintf(stderr, "Error opening file %s\n", argv[3]);
goto err;
}
if (name != NULL)
diff --git a/demos/pkcs12/pkwrite.c b/demos/pkcs12/pkwrite.c
index e9ad8cde26..262b49dc31 100644
--- a/demos/pkcs12/pkwrite.c
+++ b/demos/pkcs12/pkwrite.c
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
exit(1);
}
if ((fp = fopen(argv[4], "wb")) == NULL) {
- fprintf(stderr, "Error opening file %s\n", argv[1]);
+ fprintf(stderr, "Error opening file %s\n", argv[4]);
ERR_print_errors_fp(stderr);
exit(1);
}