diff options
author | Rich Salz <rsalz@akamai.com> | 2020-03-04 16:52:22 -0500 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2020-04-10 15:24:02 +0200 |
commit | 1ae56f2f43d36618e54cbb8dd47a7107b74505b6 (patch) | |
tree | a2704c85168a338361457a3b9765fcb02d9d2bb3 /apps/srp.c | |
parent | fa4d3fe46dfb4909c3c18c9d6141bb3b60a09eed (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/srp.c')
-rw-r--r-- | apps/srp.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/apps/srp.c b/apps/srp.c index 646e86f11a..8fb325feab 100644 --- a/apps/srp.c +++ b/apps/srp.c @@ -12,28 +12,25 @@ */ #include <openssl/opensslconf.h> -#ifdef OPENSSL_NO_SRP -NON_EMPTY_TRANSLATION_UNIT -#else -# include <stdio.h> -# include <stdlib.h> -# include <string.h> -# include <openssl/conf.h> -# include <openssl/bio.h> -# include <openssl/err.h> -# include <openssl/txt_db.h> -# include <openssl/buffer.h> -# include <openssl/srp.h> -# include "apps.h" -# include "progs.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <openssl/conf.h> +#include <openssl/bio.h> +#include <openssl/err.h> +#include <openssl/txt_db.h> +#include <openssl/buffer.h> +#include <openssl/srp.h> +#include "apps.h" +#include "progs.h" -# define BASE_SECTION "srp" -# define CONFIG_FILE "openssl.cnf" +#define BASE_SECTION "srp" +#define CONFIG_FILE "openssl.cnf" -# define ENV_DATABASE "srpvfile" -# define ENV_DEFAULT_SRP "default_srp" +#define ENV_DATABASE "srpvfile" +#define ENV_DEFAULT_SRP "default_srp" static int get_index(CA_DB *db, char *id, char type) { @@ -204,9 +201,9 @@ const OPTIONS srp_options[] = { {"verbose", OPT_VERBOSE, '-', "Talk a lot while doing things"}, {"config", OPT_CONFIG, '<', "A config file"}, {"name", OPT_NAME, 's', "The particular srp definition to use"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif OPT_SECTION("Action"), {"add", OPT_ADD, '-', "Add a user and srp verifier"}, @@ -625,4 +622,3 @@ int srp_main(int argc, char **argv) release_engine(e); return ret; } -#endif |