Commit 6981e873f06009f75f217dd63a33caf5aae99f0b

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

Logging FIPS mode.

Showing 1 changed file with 21 additions and 2 deletions   Show diff stats
src/network_modules/openssl/context.c
@@ -151,11 +151,30 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) { @@ -151,11 +151,30 @@ SSL_CTX * lib3270_openssl_get_context(H3270 *hSession) {
151 if(context) 151 if(context)
152 return context; 152 return context;
153 153
154 - trace_ssl(hSession,"Initializing SSL context.\n");  
155 -  
156 SSL_load_error_strings(); 154 SSL_load_error_strings();
157 SSL_library_init(); 155 SSL_library_init();
158 156
  157 +#ifdef OPENSSL_FIPS
  158 +
  159 + lib3270_write_log(
  160 + hSession,
  161 + "openssl",
  162 + "Initializing %s %s FIPS.\n",
  163 + SSLeay_version(SSLEAY_VERSION),
  164 + (FIPS_mode() ? "with" : "without" )
  165 + );
  166 +
  167 +#else
  168 +
  169 + lib3270_write_log(
  170 + hSession,
  171 + "openssl",
  172 + "Initializing %s without FIPS.\n",
  173 + SSLeay_version(SSLEAY_VERSION)
  174 + );
  175 +
  176 +#endif // OPENSSL_FIPS
  177 +
159 context = SSL_CTX_new(SSLv23_method()); 178 context = SSL_CTX_new(SSLv23_method());
160 if(context == NULL) { 179 if(context == NULL) {
161 static const LIB3270_SSL_MESSAGE message = { 180 static const LIB3270_SSL_MESSAGE message = {