]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
pkcs12 demo: output correct file names on error.
authorning <xiaofu.ning@ingeek.com>
Wed, 11 Mar 2020 07:28:05 +0000 (15:28 +0800)
committerPauli <paul.dale@oracle.com>
Thu, 12 Mar 2020 21:30:33 +0000 (07:30 +1000)
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)

demos/pkcs12/pkread.c
demos/pkcs12/pkwrite.c

index 33fba5d2909221f07ddc7e283af2415d49bcf983..d29ab98a60b53c3b16c3476fc1844f2e58cbba14 100644 (file)
@@ -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)
index e9ad8cde26b77e2a9ec9f9a2f26051898ed29979..262b49dc312e051dae06a2fd33ea15f0158c8c73 100644 (file)
@@ -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);
     }