Fix a typo in the X509_get0_subject_key_id() documentation
[openssl.git] / apps / dsaparam.c
index cd2ca4c3f7c9c4518f99970f41b7c1b2f6094481..2522f1fb4bfa88e1b4eea3269386990343c8eea0 100644 (file)
@@ -44,7 +44,7 @@ typedef enum OPTION_choice {
     OPT_TIMEBOMB
 } OPTION_CHOICE;
 
-OPTIONS dsaparam_options[] = {
+const OPTIONS dsaparam_options[] = {
     {"help", OPT_HELP, '-', "Display this summary"},
     {"inform", OPT_INFORM, 'F', "Input format - DER or PEM"},
     {"in", OPT_IN, '<', "Input file"},
@@ -66,6 +66,7 @@ OPTIONS dsaparam_options[] = {
 
 int dsaparam_main(int argc, char **argv)
 {
+    ENGINE *e = NULL;
     DSA *dsa = NULL;
     BIO *in = NULL, *out = NULL;
     BN_GENCB *cb = NULL;
@@ -105,7 +106,7 @@ int dsaparam_main(int argc, char **argv)
             outfile = opt_arg();
             break;
         case OPT_ENGINE:
-            (void)setup_engine(opt_arg(), 0);
+            e = setup_engine(opt_arg(), 0);
             break;
         case OPT_TIMEBOMB:
 # ifdef GENCB_TEST
@@ -215,7 +216,7 @@ int dsaparam_main(int argc, char **argv)
     }
 
     if (C) {
-        BIGNUM *p = NULL, *q = NULL, *g = NULL;
+        const BIGNUM *p = NULL, *q = NULL, *g = NULL;
         unsigned char *data;
         int len, bits_p;
 
@@ -285,6 +286,7 @@ int dsaparam_main(int argc, char **argv)
     BIO_free(in);
     BIO_free_all(out);
     DSA_free(dsa);
+    release_engine(e);
     return (ret);
 }