[cryptopp] Update to version 8.6.0 to fix CVE-2021-40530 (#23324)

* [cryptopp] Update to version 8.6.0

* Update ports/cryptopp/vcpkg.json

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* regenerate versions

* retrigger agent

* retrigger agent

* [crypto] modify patch according upsteam PR, modify version field

* update deprecated functions

* Update versions/c-/cryptopp.json

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Igor Kostenko <ikostenko@perforce.com>
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
This commit is contained in:
Igor Kostenko 2022-03-03 20:29:38 +00:00 committed by GitHub
parent 0bf2f4e517
commit 964f2fa145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 15 deletions

View File

@ -1,9 +1,9 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1683961..f63c71e 100644
index fb43b95..c39e470 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -395,6 +395,10 @@ if (MSVC)
list(APPEND CRYPTOPP_COMPILE_OPTIONS /FI winapifamily.h)
@@ -451,6 +451,10 @@ if (MSVC)
endif()
endif ()
+if(WINDOWS_STORE)
@ -13,3 +13,17 @@ index 1683961..f63c71e 100644
# Enable PIC for all target machines except 32-bit i386 due to register pressures.
if (NOT CRYPTOPP_I386)
SET(CMAKE_POSITION_INDEPENDENT_CODE 1)
@@ -1022,10 +1026,10 @@ endif ()
# add_compile_definitions added in CMake 3.12
if (${CMAKE_VERSION} VERSION_LESS "3.12")
# https://stackoverflow.com/q/61250087
- add_definitions("${CMAKE_CPP_FLAGS}" "${CMAKE_CXX_FLAGS}" "${CRYPTOPP_COMPILE_DEFINITIONS}" "${CRYPTOPP_COMPILE_OPTIONS}")
+ add_definitions(${CMAKE_CPP_FLAGS} ${CRYPTOPP_COMPILE_DEFINITIONS} ${CRYPTOPP_COMPILE_OPTIONS})
else()
- add_compile_definitions("${CMAKE_CPP_FLAGS}" "${CRYPTOPP_COMPILE_DEFINITIONS}")
- add_compile_options("${CMAKE_CXX_FLAGS}" "${CRYPTOPP_COMPILE_OPTIONS}")
+ add_compile_definitions(${CRYPTOPP_COMPILE_DEFINITIONS})
+ add_compile_options(${CMAKE_CPP_FLAGS} ${CRYPTOPP_COMPILE_OPTIONS})
endif()
#============================================================================

View File

@ -3,8 +3,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH CMAKE_SOURCE_PATH
REPO noloader/cryptopp-cmake
REF CRYPTOPP_8_5_0
SHA512 758633786c81f5a34ade0ab99983b3262bb3a028b086e734b1f8ddb618c801453d517f67176178936f87ec36a91fca93fba9bcaec4301705138954e6eb49d136
REF CRYPTOPP_8_6_0
SHA512 655107b8a41e1e6603a6b3ed2ddc95fad22b646c071c7251c3c7e2151afe439de848679235a3790fe540263424324f06c922687719da6dfea341bc2a75337bdc
HEAD_REF master
PATCHES
cmake.patch
@ -13,8 +13,8 @@ vcpkg_from_github(
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO weidai11/cryptopp
REF CRYPTOPP_8_5_0
SHA512 e8dd210c9e9d4925edc456e4d68780deaa224d85e11394ad5da835dcb1a1e6b3e899aa473acf20449f9721116960884b6d88b29335479b305bb7e29faa87e6c0
REF CRYPTOPP_8_6_0
SHA512 ccb4baa6674cd830cddb779216ce702b3cdba6de8a3d627c218861507c36bddd2861b0d0e8cad35001a1e9f0c3d5020404684c87dd05d85264ac166fa7f70589
HEAD_REF master
PATCHES patch.patch
)
@ -51,9 +51,8 @@ endif()
# https://www.cryptopp.com/wiki/Visual_Studio#Dynamic_Runtime_Linking
# https://www.cryptopp.com/wiki/Visual_Studio#The_DLL
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_SHARED=OFF
-DBUILD_STATIC=ON
@ -62,8 +61,8 @@ vcpkg_configure_cmake(
-DDISABLE_ASM=${CRYPTOPP_DISABLE_ASM}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cryptopp)
vcpkg_cmake_install ()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cryptopp)
# There is no way to suppress installation of the headers and resource files in debug build.
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

View File

@ -1,9 +1,18 @@
{
"name": "cryptopp",
"version-string": "8.5.0",
"port-version": 1,
"version": "8.6.0",
"description": "Crypto++ is a free C++ class library of cryptographic schemes.",
"homepage": "https://github.com/weidai11/cryptopp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"pem-pack": {
"description": "Crypto++ with PEM pack"

View File

@ -1673,8 +1673,8 @@
"port-version": 0
},
"cryptopp": {
"baseline": "8.5.0",
"port-version": 1
"baseline": "8.6.0",
"port-version": 0
},
"cspice": {
"baseline": "67",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0d47535ac1767600626347e025079450a909c6ba",
"version": "8.6.0",
"port-version": 0
},
{
"git-tree": "2092d648b56a683bcd8b3e72f4adc3a966956c17",
"version-string": "8.5.0",