Fix NSS format session output
authorMatt Caswell <matt@openssl.org>
Tue, 29 Dec 2015 00:17:10 +0000 (00:17 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 11 Jan 2016 10:03:27 +0000 (10:03 +0000)
Commit 189ae368d91 (RT ticket 3352) provided the capability to output
session key data in NSS format. The big apps cleanup broke that capability.
This commit restores it.

RT#4201

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
apps/sess_id.c

index 39711e2150e821dcf440e6c0cac6fb8f8a496562..2be2692f087484c42aa7d23cf99c183aa3816d5d 100644 (file)
@@ -74,7 +74,7 @@ typedef enum OPTION_choice {
 OPTIONS sess_id_options[] = {
     {"help", OPT_HELP, '-', "Display this summary"},
     {"inform", OPT_INFORM, 'F', "Input format - default PEM (DER or PEM)"},
-    {"outform", OPT_OUTFORM, 'F',
+    {"outform", OPT_OUTFORM, 'f',
      "Output format - default PEM (PEM, DER or NSS)"},
     {"in", OPT_IN, 's', "Input file - default stdin"},
     {"out", OPT_OUT, 's', "Output file - default stdout"},
@@ -114,7 +114,8 @@ int sess_id_main(int argc, char **argv)
                 goto opthelp;
             break;
         case OPT_OUTFORM:
-            if (!opt_format(opt_arg(), OPT_FMT_PEMDER, &outformat))
+            if (!opt_format(opt_arg(), OPT_FMT_PEMDER | OPT_FMT_NSS,
+                            &outformat))
                 goto opthelp;
             break;
         case OPT_IN: