Commit 7017dcf53f4dc990fb92f4856d789ff97814dcf8
1 parent
19df8857
Exists in
master
and in
1 other branch
Testing fips disable.
Showing
2 changed files
with
8 additions
and
2 deletions
Show diff stats
src/network_modules/openssl/context.c
| @@ -155,8 +155,6 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) { | @@ -155,8 +155,6 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) { | ||
| 155 | if(context) | 155 | if(context) |
| 156 | return context; | 156 | return context; |
| 157 | 157 | ||
| 158 | - SSL_load_error_strings(); | ||
| 159 | - | ||
| 160 | #if !defined(OPENSSL_FIPS) | 158 | #if !defined(OPENSSL_FIPS) |
| 161 | 159 | ||
| 162 | lib3270_write_log( | 160 | lib3270_write_log( |
| @@ -184,6 +182,9 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) { | @@ -184,6 +182,9 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) { | ||
| 184 | if(rc == ERROR_SUCCESS) { | 182 | if(rc == ERROR_SUCCESS) { |
| 185 | DWORD mode = lib3270_win32_get_dword(hKey, "fips_mode", FIPS_mode()); | 183 | DWORD mode = lib3270_win32_get_dword(hKey, "fips_mode", FIPS_mode()); |
| 186 | if(FIPS_mode_set(mode) != 1) { | 184 | if(FIPS_mode_set(mode) != 1) { |
| 185 | + | ||
| 186 | + SSL_load_error_strings(); | ||
| 187 | + | ||
| 187 | char err_buff[1024]; | 188 | char err_buff[1024]; |
| 188 | memset(err_buff,0,sizeof(err_buff)); | 189 | memset(err_buff,0,sizeof(err_buff)); |
| 189 | (void) ERR_error_string_n(ERR_get_error(), err_buff, 1023); | 190 | (void) ERR_error_string_n(ERR_get_error(), err_buff, 1023); |
| @@ -219,6 +220,7 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) { | @@ -219,6 +220,7 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) { | ||
| 219 | 220 | ||
| 220 | #endif | 221 | #endif |
| 221 | 222 | ||
| 223 | + SSL_load_error_strings(); | ||
| 222 | SSL_library_init(); | 224 | SSL_library_init(); |
| 223 | 225 | ||
| 224 | context = SSL_CTX_new(SSLv23_method()); | 226 | context = SSL_CTX_new(SSLv23_method()); |
src/testprogram/testprogram.c
| @@ -43,6 +43,10 @@ | @@ -43,6 +43,10 @@ | ||
| 43 | #include <lib3270/charset.h> | 43 | #include <lib3270/charset.h> |
| 44 | #include <stdio.h> | 44 | #include <stdio.h> |
| 45 | 45 | ||
| 46 | +#ifdef HAVE_FIPS_H | ||
| 47 | + #include <openssl/fips.h> | ||
| 48 | +#endif // HAVE_FIPS_H | ||
| 49 | + | ||
| 46 | #ifdef _WIN32 | 50 | #ifdef _WIN32 |
| 47 | #include <lib3270/win32.h> | 51 | #include <lib3270/win32.h> |
| 48 | #endif // _WIN32 | 52 | #endif // _WIN32 |