summaryrefslogtreecommitdiffstats
path: root/apps/genrsa.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2020-03-04 16:52:22 -0500
committerBernd Edlinger <bernd.edlinger@hotmail.de>2020-04-10 15:24:02 +0200
commit1ae56f2f43d36618e54cbb8dd47a7107b74505b6 (patch)
treea2704c85168a338361457a3b9765fcb02d9d2bb3 /apps/genrsa.c
parentfa4d3fe46dfb4909c3c18c9d6141bb3b60a09eed (diff)
Don't compile commands if disabled
Rather than wrapping whole files in "ifndef OPENSSL_NO_xxx" we handle the changes in build.info Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/11250)
Diffstat (limited to 'apps/genrsa.c')
-rw-r--r--apps/genrsa.c44
1 files changed, 20 insertions, 24 deletions
diff --git a/apps/genrsa.c b/apps/genrsa.c
index 3f76d9bada..deeac112b1 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -11,27 +11,24 @@
#define OPENSSL_SUPPRESS_DEPRECATED
#include <openssl/opensslconf.h>
-#ifdef OPENSSL_NO_RSA
-NON_EMPTY_TRANSLATION_UNIT
-#else
-
-# include <stdio.h>
-# include <string.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# include "apps.h"
-# include "progs.h"
-# include <openssl/bio.h>
-# include <openssl/err.h>
-# include <openssl/bn.h>
-# include <openssl/rsa.h>
-# include <openssl/evp.h>
-# include <openssl/x509.h>
-# include <openssl/pem.h>
-# include <openssl/rand.h>
-
-# define DEFBITS 2048
-# define DEFPRIMES 2
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "apps.h"
+#include "progs.h"
+#include <openssl/bio.h>
+#include <openssl/err.h>
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
+#include <openssl/evp.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <openssl/rand.h>
+
+#define DEFBITS 2048
+#define DEFPRIMES 2
static int verbose = 0;
@@ -49,9 +46,9 @@ const OPTIONS genrsa_options[] = {
OPT_SECTION("General"),
{"help", OPT_HELP, '-', "Display this summary"},
-# ifndef OPENSSL_NO_ENGINE
+#ifndef OPENSSL_NO_ENGINE
{"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"},
-# endif
+#endif
OPT_SECTION("Input"),
{"3", OPT_3, '-', "Use 3 for the E value"},
@@ -227,4 +224,3 @@ static int genrsa_cb(int p, int n, BN_GENCB *cb)
(void)BIO_flush(BN_GENCB_get_arg(cb));
return 1;
}
-#endif