diff options
Diffstat (limited to 'src/lib/libcrypto/o_fips.c')
| -rw-r--r-- | src/lib/libcrypto/o_fips.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/libcrypto/o_fips.c b/src/lib/libcrypto/o_fips.c index f6d1b21855..9c185cfb18 100644 --- a/src/lib/libcrypto/o_fips.c +++ b/src/lib/libcrypto/o_fips.c | |||
| @@ -62,18 +62,20 @@ | |||
| 62 | #include <openssl/rand.h> | 62 | #include <openssl/rand.h> |
| 63 | #endif | 63 | #endif |
| 64 | 64 | ||
| 65 | int FIPS_mode(void) | 65 | int |
| 66 | { | 66 | FIPS_mode(void) |
| 67 | { | ||
| 67 | OPENSSL_init(); | 68 | OPENSSL_init(); |
| 68 | #ifdef OPENSSL_FIPS | 69 | #ifdef OPENSSL_FIPS |
| 69 | return FIPS_module_mode(); | 70 | return FIPS_module_mode(); |
| 70 | #else | 71 | #else |
| 71 | return 0; | 72 | return 0; |
| 72 | #endif | 73 | #endif |
| 73 | } | 74 | } |
| 74 | 75 | ||
| 75 | int FIPS_mode_set(int r) | 76 | int |
| 76 | { | 77 | FIPS_mode_set(int r) |
| 78 | { | ||
| 77 | OPENSSL_init(); | 79 | OPENSSL_init(); |
| 78 | #ifdef OPENSSL_FIPS | 80 | #ifdef OPENSSL_FIPS |
| 79 | #ifndef FIPS_AUTH_USER_PASS | 81 | #ifndef FIPS_AUTH_USER_PASS |
| @@ -92,5 +94,4 @@ int FIPS_mode_set(int r) | |||
| 92 | CRYPTOerr(CRYPTO_F_FIPS_MODE_SET, CRYPTO_R_FIPS_MODE_NOT_SUPPORTED); | 94 | CRYPTOerr(CRYPTO_F_FIPS_MODE_SET, CRYPTO_R_FIPS_MODE_NOT_SUPPORTED); |
| 93 | return 0; | 95 | return 0; |
| 94 | #endif | 96 | #endif |
| 95 | } | 97 | } |
| 96 | |||
