Commit 7017dcf53f4dc990fb92f4856d789ff97814dcf8

Authored by Perry Werneck
1 parent 19df8857
Exists in master and in 1 other branch develop

Testing fips disable.

src/network_modules/openssl/context.c
... ... @@ -155,8 +155,6 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) {
155 155 if(context)
156 156 return context;
157 157  
158   - SSL_load_error_strings();
159   -
160 158 #if !defined(OPENSSL_FIPS)
161 159  
162 160 lib3270_write_log(
... ... @@ -184,6 +182,9 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) {
184 182 if(rc == ERROR_SUCCESS) {
185 183 DWORD mode = lib3270_win32_get_dword(hKey, "fips_mode", FIPS_mode());
186 184 if(FIPS_mode_set(mode) != 1) {
  185 +
  186 + SSL_load_error_strings();
  187 +
187 188 char err_buff[1024];
188 189 memset(err_buff,0,sizeof(err_buff));
189 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 220  
220 221 #endif
221 222  
  223 + SSL_load_error_strings();
222 224 SSL_library_init();
223 225  
224 226 context = SSL_CTX_new(SSLv23_method());
... ...
src/testprogram/testprogram.c
... ... @@ -43,6 +43,10 @@
43 43 #include <lib3270/charset.h>
44 44 #include <stdio.h>
45 45  
  46 +#ifdef HAVE_FIPS_H
  47 + #include <openssl/fips.h>
  48 +#endif // HAVE_FIPS_H
  49 +
46 50 #ifdef _WIN32
47 51 #include <lib3270/win32.h>
48 52 #endif // _WIN32
... ...