Fix build issues with no-dh, no-dsa and no-ec
[openssl.git] / apps / genrsa.c
index 79e2dae8008b05ba5e1dc6708c6715014fc5c247..033e692b21a0a672d1a8a0b9da0eb07cad75e352 100644 (file)
@@ -36,7 +36,7 @@ typedef enum OPTION_choice {
     OPT_OUT, OPT_RAND, OPT_PASSOUT, OPT_CIPHER
 } OPTION_CHOICE;
 
-OPTIONS genrsa_options[] = {
+const OPTIONS genrsa_options[] = {
     {"help", OPT_HELP, '-', "Display this summary"},
     {"3", OPT_3, '-', "Use 3 for the E value"},
     {"F4", OPT_F4, '-', "Use F4 (0x10001) for the E value"},
@@ -59,7 +59,7 @@ int genrsa_main(int argc, char **argv)
     ENGINE *eng = NULL;
     BIGNUM *bn = BN_new();
     BIO *out = NULL;
-    BIGNUM *e;
+    const BIGNUM *e;
     RSA *rsa = NULL;
     const EVP_CIPHER *enc = NULL;
     int ret = 1, num = DEFBITS, private = 0;
@@ -166,6 +166,7 @@ int genrsa_main(int argc, char **argv)
     BN_GENCB_free(cb);
     RSA_free(rsa);
     BIO_free_all(out);
+    release_engine(eng);
     OPENSSL_free(passout);
     if (ret != 0)
         ERR_print_errors(bio_err);