From 7b97e041ae52a9439be4dbcaaafb7965a8dc1c57 Mon Sep 17 00:00:00 2001 From: Yuriy O'Donnell Date: Thu, 1 Jul 2021 16:29:16 +0200 Subject: [PATCH] [libressl] update to 3.3.3 (#18729) Resolves #18682 --- ports/libressl/0001-enable-ocspcheck-on-msvc.patch | 2 +- ports/libressl/0002-suppress-msvc-warnings.patch | 2 +- ports/libressl/CONTROL | 8 -------- ports/libressl/portfile.cmake | 10 ++++++---- ports/libressl/vcpkg.json | 11 +++++++++++ versions/baseline.json | 4 ++-- versions/l-/libressl.json | 5 +++++ 7 files changed, 26 insertions(+), 16 deletions(-) delete mode 100644 ports/libressl/CONTROL create mode 100644 ports/libressl/vcpkg.json diff --git a/ports/libressl/0001-enable-ocspcheck-on-msvc.patch b/ports/libressl/0001-enable-ocspcheck-on-msvc.patch index fa1884a2e45..53083d314e8 100644 --- a/ports/libressl/0001-enable-ocspcheck-on-msvc.patch +++ b/ports/libressl/0001-enable-ocspcheck-on-msvc.patch @@ -9,7 +9,7 @@ index 3c80458..e8d3bf5 100644 OCSPCHECK_SRC http.c @@ -13,13 +11,27 @@ else() - set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c) + set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/strtonum.c) endif() +check_function_exists(getopt HAVE_GETOPT) diff --git a/ports/libressl/0002-suppress-msvc-warnings.patch b/ports/libressl/0002-suppress-msvc-warnings.patch index 7a5bf0038ec..79d756622b4 100644 --- a/ports/libressl/0002-suppress-msvc-warnings.patch +++ b/ports/libressl/0002-suppress-msvc-warnings.patch @@ -3,7 +3,7 @@ index a6a7554..b20fd4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,11 @@ if(WIN32) - set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32) + set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt) endif() +if(MSVC AND MSVC_VERSION GREATER_EQUAL 1912) diff --git a/ports/libressl/CONTROL b/ports/libressl/CONTROL deleted file mode 100644 index 2b7d62ec20a..00000000000 --- a/ports/libressl/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: libressl -Version: 2.9.1 -Port-Version: 3 -Description: LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes. -Supports: !(uwp|arm) - -Feature: tools -Description: Build openssl and ocspcheck executables diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 7e37c207edd..7483e02c880 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -6,8 +6,8 @@ endif() vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") -set(LIBRESSL_VERSION 2.9.1) -set(LIBRESSL_HASH 7051911e566bb093c48a70da72c9981b870e3bf49a167ba6c934eece873084cc41221fbe3cd0c8baba268d0484070df7164e4b937854e716337540a87c214354) +set(LIBRESSL_VERSION 3.3.3) +set(LIBRESSL_HASH 2d0b5f4cfe37d573bc64d5967abb77f536dbe581fbad9637d925332bcdfd185fe6810335b2af80a89f92d7e6edaa8ea3ba2492c60a117e47ea1b2d6aacf01f0f) vcpkg_download_distfile( LIBRESSL_SOURCE_ARCHIVE @@ -26,7 +26,8 @@ vcpkg_extract_source_archive_ex( ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - "tools" LIBRESSL_APPS + FEATURES + "tools" LIBRESSL_APPS ) vcpkg_configure_cmake( @@ -59,6 +60,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/etc/ssl/certs" + "${CURRENT_PACKAGES_DIR}/debug/etc/ssl/certs" "${CURRENT_PACKAGES_DIR}/share/man" "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" @@ -68,7 +70,7 @@ vcpkg_copy_pdbs() file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -if((VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")) +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) file(GLOB_RECURSE LIBS "${CURRENT_PACKAGES_DIR}/*.lib") foreach(LIB ${LIBS}) string(REGEX REPLACE "(.+)-[0-9]+\\.lib" "\\1.lib" LINK "${LIB}") diff --git a/ports/libressl/vcpkg.json b/ports/libressl/vcpkg.json new file mode 100644 index 00000000000..59c18243c2f --- /dev/null +++ b/ports/libressl/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libressl", + "version": "3.3.3", + "description": "LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.", + "supports": "!(uwp | arm)", + "features": { + "tools": { + "description": "Build openssl and ocspcheck executables" + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index d365b5d345b..c20979b05dc 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3501,8 +3501,8 @@ "port-version": 0 }, "libressl": { - "baseline": "2.9.1", - "port-version": 3 + "baseline": "3.3.3", + "port-version": 0 }, "librsvg": { "baseline": "2.40.20", diff --git a/versions/l-/libressl.json b/versions/l-/libressl.json index 62ab6a809d3..c8d28210087 100644 --- a/versions/l-/libressl.json +++ b/versions/l-/libressl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "24a18d6ed79f2b8c4c01c5201998981b2d831a1a", + "version": "3.3.3", + "port-version": 0 + }, { "git-tree": "3de8a5b9f15524db17ccff3c0a4c61266d8fb3b1", "version-string": "2.9.1",