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

[openssl] support fips build feature #30916

Merged
merged 12 commits into from
Apr 21, 2023
6 changes: 6 additions & 0 deletions ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ vcpkg_list(SET CONFIGURE_OPTIONS
no-tests
)

set(INSTALL_FIPS "")
if("fips" IN_LIST FEATURES)
vcpkg_list(APPEND INSTALL_FIPS install_fips)
Adela0814 marked this conversation as resolved.
Show resolved Hide resolved
vcpkg_list(APPEND CONFIGURE_OPTIONS enable-fips)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_list(APPEND CONFIGURE_OPTIONS shared)
else()
Expand Down
6 changes: 5 additions & 1 deletion ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openssl",
"version": "3.1.0",
"port-version": 1,
"port-version": 2,
"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",
"license": "Apache-2.0",
Expand All @@ -20,6 +20,10 @@
}
],
"features": {
"fips": {
"description": "Enable fips",
"supports": "!static"
},
"tools": {
"description": "Install openssl executable and scripts",
"supports": "!uwp"
Expand Down
3 changes: 2 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 Down Expand Up @@ -125,4 +125,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 @@ -5874,7 +5874,7 @@
},
"openssl": {
"baseline": "3.1.0",
"port-version": 1
"port-version": 2
},
"openssl-unix": {
"baseline": "deprecated",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openssl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "64fc47730d346ecacc9f948c2c3138363ed8f702",
"version": "3.1.0",
"port-version": 2
},
{
"git-tree": "b123beef6759b490ff8679b5cd4db0f721a2808a",
"version": "3.1.0",
Expand Down