diff options
author | Parménides GV <parmegv@sdf.org> | 2014-06-13 12:13:04 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-06-13 12:13:04 +0200 |
commit | 3a71bc9e4aa4296f460e2e3c55de74c9852477ad (patch) | |
tree | f816597a7c4322137f0657e7aa2bf392404d1870 /app/openssl/apps/openssl.c | |
parent | cfe67bfd8260253ce9288225b9e26f666d27133f (diff) | |
parent | 36247e71df88fa13c6c5a887de3b11d9a883615f (diff) |
Merge branch 'feature/establish-an-upstream-relationship-with-ics-openvpn-codebase-#5381' into develop
Diffstat (limited to 'app/openssl/apps/openssl.c')
-rw-r--r-- | app/openssl/apps/openssl.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/openssl/apps/openssl.c b/app/openssl/apps/openssl.c index 10689573..a9fa1e3f 100644 --- a/app/openssl/apps/openssl.c +++ b/app/openssl/apps/openssl.c @@ -117,6 +117,7 @@ #include "apps.h" #include <openssl/bio.h> #include <openssl/crypto.h> +#include <openssl/rand.h> #include <openssl/lhash.h> #include <openssl/conf.h> #include <openssl/x509.h> @@ -129,6 +130,9 @@ #include "progs.h" #include "s_apps.h" #include <openssl/err.h> +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif /* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the * base prototypes (we cast each variable inside the function to the required @@ -310,6 +314,19 @@ int main(int Argc, char *ARGV[]) CRYPTO_set_locking_callback(lock_dbg_cb); } + if(getenv("OPENSSL_FIPS")) { +#ifdef OPENSSL_FIPS + if (!FIPS_mode_set(1)) { + ERR_load_crypto_strings(); + ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); + EXIT(1); + } +#else + fprintf(stderr, "FIPS mode not supported.\n"); + EXIT(1); +#endif + } + apps_startup(); /* Lets load up our environment a little */ |