Skip to content
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

Cherry-pick OpenSSL 3.1.2 onto 2.4 #84

Merged
merged 7 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openssl/openssl
REF "openssl-${VERSION}"
SHA512 877b4bc4b59126bdaf626b01322c8ac5325945234acd14907e4a23019f1fd38ec17b5fae9ff60aa9b6b0089c29b0e4255a19cd2a1743c3db82a616286c60d3b9
SHA512 c48ad86265b0fee18b23863b645a286d131a863a3418c7d2ed6c819eebb822ad0f2985ba3ecbf4def32515442f0eb40aba08f3146d113247e86ec80fbddca1c1
PATCHES
disable-apps.patch
disable-install-docs.patch
script-prefix.patch
windows/install-layout.patch
windows/install-pdbs.patch
windows/perlasm-scheme.patch
unix/android-cc.patch
unix/move-openssldir.patch
unix/no-empty-dirs.patch
Expand All @@ -40,6 +41,12 @@ vcpkg_list(SET CONFIGURE_OPTIONS
no-tests
)

set(INSTALL_FIPS "")
if("fips" IN_LIST FEATURES)
vcpkg_list(APPEND INSTALL_FIPS install_fips)
vcpkg_list(APPEND CONFIGURE_OPTIONS enable-fips)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_list(APPEND CONFIGURE_OPTIONS shared)
else()
Expand All @@ -66,4 +73,4 @@ else()
endif()

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
2 changes: 1 addition & 1 deletion ports/openssl/unix/configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
6 changes: 5 additions & 1 deletion ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openssl",
"version": "3.1.0",
"version": "3.1.2",
"port-version": 1,
"description": "OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.",
"homepage": "https://www.openssl.org",
Expand All @@ -20,6 +20,10 @@
}
],
"features": {
"fips": {
"description": "Enable fips",
"supports": "!static"
},
"tools": {
"description": "Install openssl executable and scripts",
"supports": "!uwp"
Expand Down
39 changes: 39 additions & 0 deletions ports/openssl/windows/perlasm-scheme.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index e8084ab..263ecd0 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -9,19 +9,22 @@ sub vc_win64a_info {
$vc_win64a_info = { AS => "nasm",
ASFLAGS => "-g",
asflags => "-Ox -f win64 -DNEAR",
- asoutflag => "-o " };
+ asoutflag => "-o ",
+ perlasm_scheme => "nasm" };
} elsif ($disabled{asm}) {
# assembler is still used to compile uplink shim
$vc_win64a_info = { AS => "ml64",
ASFLAGS => "/nologo /Zi",
asflags => "/c /Cp /Cx",
- asoutflag => "/Fo" };
+ asoutflag => "/Fo",
+ perlasm_scheme => "masm" };
} else {
$die->("NASM not found - make sure it's installed and available on %PATH%\n");
$vc_win64a_info = { AS => "{unknown}",
ASFLAGS => "",
asflags => "",
- asoutflag => "" };
+ asoutflag => "",
+ perlasm_scheme => "auto" };
}
}
return $vc_win64a_info;
@@ -1493,7 +1496,7 @@ my %targets = (
sys_id => "WIN64A",
uplink_arch => 'x86_64',
asm_arch => 'x86_64',
- perlasm_scheme => "auto",
+ perlasm_scheme => sub { vc_win64a_info()->{perlasm_scheme} },
multilib => "-x64",
},
"VC-WIN32" => {
7 changes: 6 additions & 1 deletion ports/openssl/windows/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ vcpkg_build_nmake(
"LD=${ld}"
"LDFLAGS=${VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG}"
PROJECT_NAME "makefile"
TARGET install_dev install_modules
TARGET install_dev install_modules ${INSTALL_FIPS}
LOGFILE_ROOT install
OPTIONS
"INSTALL_PDBS=${OPENSSL_BUILD_MAKES_PDBS}" # install-pdbs.patch
Expand All @@ -89,13 +89,17 @@ set(scripts "bin/c_rehash.pl" "misc/CA.pl" "misc/tsget.pl")
if("tools" IN_LIST FEATURES)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(RENAME "${CURRENT_PACKAGES_DIR}/openssl.cnf" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/openssl.cnf")
if("fips" IN_LIST FEATURES)
file(RENAME "${CURRENT_PACKAGES_DIR}/fipsmodule.cnf" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/fipsmodule.cnf")
endif()
foreach(script IN LISTS scripts)
file(COPY "${CURRENT_PACKAGES_DIR}/${script}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/${script}" "${CURRENT_PACKAGES_DIR}/debug/${script}")
endforeach()
vcpkg_copy_tools(TOOL_NAMES openssl AUTO_CLEAN)
else()
file(REMOVE "${CURRENT_PACKAGES_DIR}/openssl.cnf")
file(REMOVE "${CURRENT_PACKAGES_DIR}/fipsmodule.cnf")
foreach(script IN LISTS scripts)
file(REMOVE "${CURRENT_PACKAGES_DIR}/${script}" "${CURRENT_PACKAGES_DIR}/debug/${script}")
endforeach()
Expand Down Expand Up @@ -125,4 +129,5 @@ file(REMOVE
"${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist"
"${CURRENT_PACKAGES_DIR}/debug/openssl.cnf"
"${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist"
"${CURRENT_PACKAGES_DIR}/debug/fipsmodule.cnf"
)
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5861,7 +5861,7 @@
"port-version": 1
},
"openssl": {
"baseline": "3.1.0",
"baseline": "3.1.2",
"port-version": 1
},
"openssl-unix": {
Expand Down
35 changes: 35 additions & 0 deletions versions/o-/openssl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
{
"versions": [
{
"git-tree": "5a99562f8ac47a68a58efba5f0d40259fedeecc5",
"version": "3.1.2",
"port-version": 1
},
{
"git-tree": "db4486fff3146088dd150f067ebf940c649ffe42",
"version": "3.1.2",
"port-version": 0
},
{
"git-tree": "da3981b5b899f4e74db269ca4854f4bf05d9d387",
"version": "3.1.1",
"port-version": 1
},
{
"git-tree": "dc8edd2b6e1e1552688c29dc46d5cd5c9183804b",
"version": "3.1.1",
"port-version": 0
},
{
"git-tree": "68137d1e48b5f9424e9de3d038a9e2c92f1baf39",
"version": "3.1.0",
"port-version": 4
},
{
"git-tree": "b99152f5be63f45b2f3be6eb1624d96d70b21b49",
"version": "3.1.0",
"port-version": 3
},
{
"git-tree": "64fc47730d346ecacc9f948c2c3138363ed8f702",
"version": "3.1.0",
"port-version": 2
},
{
"git-tree": "b123beef6759b490ff8679b5cd4db0f721a2808a",
"version": "3.1.0",
Expand Down