be-secure-openssl.c.diff
application/octet-stream
Filename: be-secure-openssl.c.diff
Type: application/octet-stream
Part: 0
146,190d145
<
< #ifdef WIN32
< HKEY rootKey;
< DWORD fipsEnabled = 0;
< DWORD fipsEnabledSize = sizeof(DWORD);
<
< if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
< "System\\CurrentControlSet\\Control\\Lsa\\FipsAlgorithmPolicy",
< 0,
< KEY_READ,
< &rootKey) != ERROR_SUCCESS)
< {
< ereport(isServerStart ? FATAL : LOG,
< (errmsg("could not open FIPS registry key")));
< goto error;
< }
< if (RegQueryValueEx(rootKey,
< "Enabled",
< 0,
< 0,
< (LPBYTE)&fipsEnabled,
< &fipsEnabledSize) != ERROR_SUCCESS)
< {
< RegCloseKey(rootKey);
< ereport(isServerStart ? FATAL : LOG,
< (errmsg("could not read FIPS registry entry")));
< goto error;
< }
< RegCloseKey(rootKey);
<
< if (fipsEnabled == 1 && FIPS_mode() == 0)
< {
< if (FIPS_mode_set(1) != 1)
< {
< ereport(isServerStart ? FATAL : LOG,
< (errmsg("could not enable FIPS mode")));
< goto error;
< }
<
< ereport(LOG,
< (errmsg("successfully enabled OpenSSL FIPS mode")));
< }
<
< #endif
<