-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[openssl] update to 3.0.2 #22878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[openssl] update to 3.0.2 #22878
Changes from all commits
Commits
Show all changes
185 commits
Select commit
Hold shift + click to select a range
f251eaf
Create package openssl3
Thomas1664 5c1d288
Create package openssl3
Thomas1664 a30f4fe
Merge branch 'microsoft:master' into master
Thomas1664 de053ed
Delete openssl3
Thomas1664 bcc44b3
update version to 3.0.1
Thomas1664 fa7d5a4
Delete openssl3
Thomas1664 bb02f62
Update manifests to 3.0.1
Thomas1664 69e4831
Fix download url
Thomas1664 9a826cb
Update port version
Thomas1664 edb88fa
Update version
Thomas1664 f0ca098
Remove wrong port version
Thomas1664 5fa2151
Fix errors
Thomas1664 4c32def
Fix license
Thomas1664 67926aa
Remove empty folders
Thomas1664 79dff60
Fix post-build errors
Thomas1664 c602bea
Add license field
Thomas1664 a3c3c70
Fix cmake for uwp
Thomas1664 498d5f5
Remove patch file
Thomas1664 ea97a0b
format manifest
Thomas1664 55b0b02
Update version file
Thomas1664 5be437c
Fix port version
Thomas1664 97f37f5
version
Thomas1664 6e2d7a8
Test: remove vcvarsall
Thomas1664 36f875e
version
Thomas1664 cfdfeb3
Merge branch 'pr/Thomas1664/1'
Thomas1664 cf7480d
fix version
Thomas1664 a2c70a7
Merge branch 'microsoft:master' into master
Thomas1664 0de7185
version
Thomas1664 c39899f
Fix docs in cmake files as well
Thomas1664 af15b5b
wrong branch
Thomas1664 864ad2d
Merge branch 'microsoft:master' into master
Thomas1664 c52c0ea
Merge branch 'microsoft:master' into master
Thomas1664 7d0f039
Merge branch 'microsoft:master' into master
Thomas1664 f466396
Add port openssl-1
Thomas1664 36744e6
Fix directories
Thomas1664 36fbc7c
delete openssl-1
Thomas1664 415074a
[openssl-1] Add port
Thomas1664 feb8f87
version
Thomas1664 c77af15
Fix UWP build
Thomas1664 bf31ce8
version
Thomas1664 8f5c679
migrate uthenticode
Thomas1664 363e782
version
Thomas1664 b9ba018
Fix UWP build for librabbitmq
Thomas1664 40398aa
version
Thomas1664 f72e6b8
Merge branch 'microsoft:master' into master
Thomas1664 0c6e1f2
Fix UWP warnings
Thomas1664 ac1a3eb
version
Thomas1664 0b8a5e0
Fix patch
Thomas1664 ff2e158
version
Thomas1664 06313c1
Disable C4996 on UWP
Thomas1664 75ec695
version
Thomas1664 6ac26cd
[idevicerestore] disable C4996
Thomas1664 6d42e6e
remove warning fixes
Thomas1664 ee517da
Revert uthenticode
Thomas1664 2962704
Final newlines
Thomas1664 31dd7b3
version
Thomas1664 125abcd
Remove winsock replace
Thomas1664 dc3a33f
version
Thomas1664 3ea4743
Merge branch 'openssl-compat'
Thomas1664 7d13aac
[libwebsockets] Disable /WX on Windows
Thomas1664 caa273c
version
Thomas1664 8de44ae
Typo
Thomas1664 cde0afc
version
Thomas1664 bf3c7b7
Disable C4996 in patch instead
Thomas1664 6532a2a
version
Thomas1664 90c42bb
[luasec] Use openssl-1
Thomas1664 3ea9817
version
Thomas1664 e6bafa9
revert luasec
Thomas1664 f1742ed
migrate luasec
Thomas1664 3a02d5f
version
Thomas1664 6cd5d3f
revert winsock
Thomas1664 f0179b9
version
Thomas1664 bf78f75
revert winsock
Thomas1664 a50c702
version
Thomas1664 a19fc96
revert revert
Thomas1664 cdf92d1
version
Thomas1664 e11d850
Fix platform for luasec
Thomas1664 6f1cef8
Fix supports
Thomas1664 53077bc
version
Thomas1664 87de6bf
.
Thomas1664 9d8cc11
version
Thomas1664 3ea2526
uthenticode
Thomas1664 66c6034
libmysql
Thomas1664 280aeb4
azure-c-shared-utility
Thomas1664 86a8e90
version
Thomas1664 eedc9a1
Merge branch 'microsoft:master' into master
Thomas1664 9b3cdbc
remove azure-c-shared-utility
Thomas1664 dfff1f7
revert all
Thomas1664 76da110
uthenticode
Thomas1664 f12ed2b
version
Thomas1664 04b5c70
azure
Thomas1664 02c82da
version
Thomas1664 90b0b10
libmysql
Thomas1664 101f423
version
Thomas1664 7aa3100
remove mysql
Thomas1664 4db32c1
Merge branch 'microsoft:master' into openssl-compat
Thomas1664 fb72fbd
Merge branch 'microsoft:master' into master
Thomas1664 67bf0a2
Merge branch 'microsoft:master' into openssl-compat
Thomas1664 43cd811
[libdatachannel] disable warnings on UWP
Thomas1664 e52af5c
version
Thomas1664 801f780
Fix patches
Thomas1664 33fe546
version
Thomas1664 e599b3e
Merge branch 'microsoft:master' into master
Thomas1664 b83103e
Merge branch 'master' of https://github.com/Thomas1664/vcpkg
Thomas1664 e974cc0
Add openssl-1 to CI baseline
Thomas1664 12413c8
openssl-1: check if copyright exists
Thomas1664 7c5d499
version
Thomas1664 14933b9
Merge remote-tracking branch 'upstream/master' into openssl-compat
Thomas1664 f3317c1
revert azure
Thomas1664 cdab17f
[libssh2] disable c4996
Thomas1664 370273b
version
Thomas1664 a6a9532
[aws-sdk-cpp] -Wno-deprecated
Thomas1664 e4af942
version
Thomas1664 9e93450
fix aws patch
Thomas1664 c23abda
version
Thomas1664 9b5a81b
fix aws patch
Thomas1664 5d4e966
version
Thomas1664 520328a
[qpid-proton] disable warning
Thomas1664 7b046a2
version
Thomas1664 9e7e44f
Fix patch
Thomas1664 cae7a79
version
Thomas1664 5129844
[librtmp] disable c4996
Thomas1664 2ab494e
version
Thomas1664 7b4c75e
[libu2f-server] disablec4996
Thomas1664 12b7b50
switch version scheme
Thomas1664 d296b50
version
Thomas1664 075d58a
[idevicerestore] disable c4996
Thomas1664 387ba37
version
Thomas1664 ccb9503
typo
Thomas1664 b4b76fe
version
Thomas1664 89d2a3a
fix cmake
Thomas1664 de2099e
version
Thomas1664 2c640e6
fix cmake again
Thomas1664 f387071
version
Thomas1664 08ff922
Merge branch 'openssl-compat'
Thomas1664 0d9de49
[uthenticode] patch to support Openssl 3
Thomas1664 1eea67a
version
Thomas1664 67c98be
fix idevicerestore
Thomas1664 b11e30f
version
Thomas1664 e29b0d9
search for conflicting copyrights
Thomas1664 5c7938c
version
Thomas1664 edaa88d
Fix luasec
Thomas1664 f292c39
fix version
Thomas1664 b3f41d4
version
Thomas1664 b9074f3
Merge branch 'microsoft:master' into master
Thomas1664 c210ea8
fix azure
Thomas1664 d8359b0
version
Thomas1664 95c2584
Remove debug stuff
Thomas1664 d8ae216
version
Thomas1664 5a1c7ca
[open62541] patch
Thomas1664 5e144e0
update port version
Thomas1664 752887d
version
Thomas1664 1195ebd
[libmysql] patch
Thomas1664 5bcde9a
version
Thomas1664 7679069
Fix patch
Thomas1664 43918c3
version
Thomas1664 e00736d
Format openssl
Thomas1664 6d40498
Rename openssl-1 to openssl1
Thomas1664 3ca9b99
version
Thomas1664 1061a52
Merge branch 'microsoft:master' into master
Thomas1664 ed7c5aa
Merge branch 'master' into master
Thomas1664 4c408ca
resolve conflicting port versions
Thomas1664 de194ab
version
Thomas1664 bd4e0bc
Merge branch 'microsoft:master' into master
Thomas1664 e35d273
apply latest openssl security fix
Thomas1664 28ae985
version
Thomas1664 e79f802
Merge branch 'microsoft:master' into master
Thomas1664 d4f386b
Merge branch 'master' of https://github.com/Thomas1664/vcpkg
Thomas1664 e06b45e
Merge branch 'master' of https://github.com/microsoft/vcpkg
Thomas1664 f3ebc73
Fix qpid-proton
Thomas1664 0282b4f
version
Thomas1664 02ea1f1
retrigger Bbuild of qtbase
Thomas1664 ffdd7ae
version
Thomas1664 57a1b0c
revert qtbase
Thomas1664 c510c95
Merge branch 'microsoft:master' into master
Thomas1664 bdcd8a2
Merge branch 'microsoft:master' into master
Thomas1664 2a22259
Remove openssl1
Thomas1664 c516929
Merge branch 'master' of https://github.com/microsoft/vcpkg
Thomas1664 ba57e48
version
Thomas1664 38db83e
Merge branch 'master' of https://github.com/microsoft/vcpkg
Thomas1664 6569a52
version
Thomas1664 23d41f5
Merge branch 'microsoft:master' into master
Thomas1664 f36246e
Merge branch 'microsoft:master' into master
Thomas1664 78eaa89
fix openssl_version_fix
strega-nil 49bdb82
Merge branch 'microsoft:master' into master
Thomas1664 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/cmake/compiler_settings.cmake b/cmake/compiler_settings.cmake | ||
| index cae5b92248..1aa728b01c 100644 | ||
| --- a/cmake/compiler_settings.cmake | ||
| +++ b/cmake/compiler_settings.cmake | ||
| @@ -53,7 +53,7 @@ macro(set_gcc_flags) | ||
| endmacro() | ||
|
|
||
| macro(set_gcc_warnings) | ||
| - list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra") | ||
| + list(APPEND AWS_COMPILER_WARNINGS "-Wno-deprecated-declarations" "-Wall" "-Werror" "-pedantic" "-Wextra") | ||
| if(COMPILER_CLANG) | ||
| if(PLATFORM_ANDROID) | ||
| # when using clang with libc and API lower than 21 we need to include Android support headers and ignore the gnu-include-next warning. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/adapters/x509_openssl.c b/adapters/x509_openssl.c | ||
| index 5a9e5ac2..bb946c2d 100644 | ||
| --- a/adapters/x509_openssl.c | ||
| +++ b/adapters/x509_openssl.c | ||
| @@ -75,7 +75,7 @@ static int load_certificate_chain(SSL_CTX* ssl_ctx, const char* certificate) | ||
| // certificates. | ||
|
|
||
| /* Codes_SRS_X509_OPENSSL_07_006: [ If successful x509_openssl_add_ecc_credentials shall to import each certificate in the cert chain. ] */ | ||
| -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) | ||
| +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) | ||
| SSL_CTX_clear_extra_chain_certs(ssl_ctx); | ||
| #else | ||
| if (ssl_ctx->extra_certs != NULL) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 26 additions & 5 deletions
31
ports/idevicerestore/libcurl_d.patch → ports/idevicerestore/fix-vcxproj.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,44 @@ | ||
| diff --git a/idevicerestore.vcxproj b/idevicerestore.vcxproj | ||
| index fa209fae..cf89306b 100644 | ||
| index fa209fa..6afa088 100644 | ||
| --- a/idevicerestore.vcxproj | ||
| +++ b/idevicerestore.vcxproj | ||
| @@ -94,7 +94,7 @@ | ||
| +++ b/idevicerestore.vcxproj | ||
| @@ -92,9 +92,10 @@ | ||
| <Optimization>Disabled</Optimization> | ||
| <SDLCheck>true</SDLCheck> | ||
| <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS</PreprocessorDefinitions> | ||
| + <DisableSpecificWarnings>4996</DisableSpecificWarnings> | ||
BillyONeal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </ClCompile> | ||
| <Link> | ||
| - <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
| + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl-d.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
| @@ -105,7 +105,7 @@ | ||
| @@ -103,9 +104,10 @@ | ||
| <Optimization>Disabled</Optimization> | ||
| <SDLCheck>true</SDLCheck> | ||
| <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS</PreprocessorDefinitions> | ||
| + <DisableSpecificWarnings>4996</DisableSpecificWarnings> | ||
| </ClCompile> | ||
| <Link> | ||
| - <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
| + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl-d.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
|
|
||
| @@ -116,6 +118,7 @@ | ||
| <IntrinsicFunctions>true</IntrinsicFunctions> | ||
| <SDLCheck>true</SDLCheck> | ||
| <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS</PreprocessorDefinitions> | ||
| + <DisableSpecificWarnings>4996</DisableSpecificWarnings> | ||
| </ClCompile> | ||
| <Link> | ||
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
| @@ -131,6 +134,7 @@ | ||
| <IntrinsicFunctions>true</IntrinsicFunctions> | ||
| <SDLCheck>true</SDLCheck> | ||
| <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS</PreprocessorDefinitions> | ||
| + <DisableSpecificWarnings>4996</DisableSpecificWarnings> | ||
| </ClCompile> | ||
| <Link> | ||
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index b79b458..790bf95 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -385,6 +385,9 @@ if(WARNINGS_AS_ERRORS) | ||
| endif() | ||
| endif() | ||
|
|
||
| +target_compile_options(datachannel PRIVATE /wd4996) | ||
| +target_compile_options(datachannel-static PRIVATE /wd4996) | ||
| + | ||
| install(TARGETS datachannel EXPORT LibDataChannelTargets | ||
| RUNTIME DESTINATION bin | ||
| LIBRARY DESTINATION lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc | ||
| index dea997b252c..81484f0652b 100644 | ||
| --- a/mysys/my_md5.cc | ||
| +++ b/mysys/my_md5.cc | ||
| @@ -35,6 +35,10 @@ | ||
| #include <openssl/crypto.h> | ||
| #include <openssl/md5.h> | ||
|
|
||
| +#if OPENSSL_VERSION_NUMBER >= 0x30000000L | ||
| +#include <openssl/evp.h> | ||
| +#endif | ||
| + | ||
| static void my_md5_hash(unsigned char *digest, unsigned const char *buf, | ||
| int len) { | ||
| MD5_CTX ctx; | ||
| @@ -56,7 +60,11 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf, | ||
| int compute_md5_hash(char *digest, const char *buf, int len) { | ||
| int retval = 0; | ||
| int fips_mode = 0; | ||
| + #if OPENSSL_VERSION_NUMBER < 0x30000000L | ||
| fips_mode = FIPS_mode(); | ||
| + #else | ||
| + fips_mode = EVP_default_properties_is_fips_enabled(NULL); | ||
| + #endif | ||
| /* If fips mode is ON/STRICT restricted method calls will result into abort, | ||
| * skipping call. */ | ||
| if (fips_mode == 0) { | ||
| diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc | ||
| index 13bc6794ea5..8752bcea9bf 100644 | ||
| --- a/plugin/x/client/xconnection_impl.cc | ||
| +++ b/plugin/x/client/xconnection_impl.cc | ||
| @@ -51,6 +51,10 @@ | ||
| #include "plugin/x/src/config/config.h" | ||
| #include "sql-common/net_ns.h" | ||
|
|
||
| +#if OPENSSL_VERSION_NUMBER >= 0x30000000L | ||
| +#include <openssl/evp.h> | ||
| +#endif | ||
| + | ||
| #ifndef WIN32 | ||
| #include <netdb.h> | ||
| #include <sys/socket.h> | ||
| @@ -524,12 +528,20 @@ int set_fips_mode(const uint32_t fips_mode, | ||
| if (fips_mode > 2) { | ||
| goto EXIT; | ||
| } | ||
| + #if OPENSSL_VERSION_NUMBER < 0x30000000L | ||
| fips_mode_old = FIPS_mode(); | ||
| + #else | ||
| + fips_mode_old = EVP_default_properties_is_fips_enabled(NULL); | ||
| + #endif | ||
| if (fips_mode_old == fips_mode) { | ||
| rc = 1; | ||
| goto EXIT; | ||
| } | ||
| + #if OPENSSL_VERSION_NUMBER < 0x30000000L | ||
| if (!(rc = FIPS_mode_set(fips_mode))) { | ||
| + #else | ||
| + if (!(rc = EVP_default_properties_enable_fips(fips_mode))) { | ||
| + #endif | ||
| err_library = ERR_get_error(); | ||
| ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1); | ||
| err_string[OPENSSL_ERROR_LENGTH - 1] = '\0'; | ||
| diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc | ||
| index 6c04029ccb0..164b727e3dc 100644 | ||
| --- a/vio/viosslfactories.cc | ||
| +++ b/vio/viosslfactories.cc | ||
| @@ -40,6 +40,10 @@ | ||
|
|
||
| #include <openssl/dh.h> | ||
|
|
||
| +#if OPENSSL_VERSION_NUMBER >= 0x30000000L | ||
| +#include <openssl/evp.h> | ||
| +#endif | ||
| + | ||
| #if OPENSSL_VERSION_NUMBER < 0x10002000L | ||
| #include <openssl/ec.h> | ||
| #endif /* OPENSSL_VERSION_NUMBER < 0x10002000L */ | ||
| @@ -498,12 +502,20 @@ int set_fips_mode(const uint fips_mode, char err_string[OPENSSL_ERROR_LENGTH]) { | ||
| if (fips_mode > 2) { | ||
| goto EXIT; | ||
| } | ||
| + #if OPENSSL_VERSION_NUMBER < 0x30000000L | ||
| fips_mode_old = FIPS_mode(); | ||
| + #else | ||
| + fips_mode_old = EVP_default_properties_is_fips_enabled(NULL); | ||
| + #endif | ||
| if (fips_mode_old == fips_mode) { | ||
| rc = 1; | ||
| goto EXIT; | ||
| } | ||
| + #if OPENSSL_VERSION_NUMBER < 0x30000000L | ||
| if (!(rc = FIPS_mode_set(fips_mode))) { | ||
| + #else | ||
| + if (!(rc = EVP_default_properties_enable_fips(NULL, fips_mode))) { | ||
| + #endif | ||
| /* | ||
| If OS doesn't have FIPS enabled openssl library and user sets FIPS mode | ||
| ON, It fails with proper error. But in the same time it doesn't allow to | ||
| @@ -511,7 +523,11 @@ int set_fips_mode(const uint fips_mode, char err_string[OPENSSL_ERROR_LENGTH]) { | ||
| error, setting old working FIPS mode value in the OpenSSL library. It will | ||
| allow successful cryptographic operation and will not abort the server. | ||
| */ | ||
| + #if OPENSSL_VERSION_NUMBER < 0x30000000L | ||
| FIPS_mode_set(fips_mode_old); | ||
| + #else | ||
| + EVP_default_properties_enable_fips(NULL, fips_mode_old); | ||
| + #endif | ||
| err_library = ERR_get_error(); | ||
| ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1); | ||
| err_string[OPENSSL_ERROR_LENGTH - 1] = '\0'; | ||
| @@ -525,7 +541,13 @@ EXIT: | ||
|
|
||
| @returns openssl current fips mode | ||
| */ | ||
| +#if OPENSSL_VERSION_NUMBER < 0x30000000L | ||
| uint get_fips_mode() { return FIPS_mode(); } | ||
| +#else | ||
| +uint get_fips_mode() { | ||
| + return EVP_default_properties_is_fips_enabled(NULL); | ||
| +} | ||
| +#endif | ||
|
|
||
| long process_tls_version(const char *tls_version) { | ||
| const char *separator = ","; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/cmake/max_warnings.cmake b/cmake/max_warnings.cmake | ||
| index b176d30..e986461 100644 | ||
| --- a/cmake/max_warnings.cmake | ||
| +++ b/cmake/max_warnings.cmake | ||
| @@ -13,6 +13,8 @@ if(MSVC) | ||
|
|
||
| # Disable broken warnings | ||
| add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) | ||
| + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") | ||
| + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996") | ||
| elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) | ||
| if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.