Skip to content

Commit

Permalink
[OpenSSL] Update to 3.0.7. (#27594)
Browse files Browse the repository at this point in the history
* [OpenSSL] Update to 3.0.7.

Fixes critical security vulnerability https://twitter.com/iamamoose/status/1584908434855628800

flags.patch part already applied by upstream removed.

Download location changed to openssl.org while a github tag is still missing.

* Revert unintentional boringssl change.

* Add vcpkg_minimum_required and switch back to GitHub now that a tag is available.
  • Loading branch information
BillyONeal committed Nov 2, 2022
1 parent ad91176 commit 09adfdc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion ports/openssl/openssl.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ prefix=${pcfiledir}/../..
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Version: @OPENSSL_VERSION@
Version: @VERSION@
@pc_data@
7 changes: 3 additions & 4 deletions ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
if(EXISTS "${CURRENT_INSTALLED_DIR}/share/libressl/copyright"
OR EXISTS "${CURRENT_INSTALLED_DIR}/share/boringssl/copyright")
message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.")
Expand All @@ -11,17 +12,15 @@ It can be installed on alpine systems via apk add linux-headers.]]
)
endif()

set(OPENSSL_VERSION 3.0.5)

if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
set(OPENSSL_PATCHES "${CMAKE_CURRENT_LIST_DIR}/windows/flags.patch")
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openssl/openssl
REF openssl-${OPENSSL_VERSION}
SHA512 e426f2d48dcd87ad938b246cea69988710198c3ed2f5bb9065aa9e74492161b056336f5b1f29be64e70dfd86a77808fe727ebb46eae10331c76f1ff08e341133
REF openssl-${VERSION}
SHA512 27dd3ef0c1827a74ec880d20232acb818c7d05e004ad7389c355e200a01e899f1b1ba5c34dcce44ecf7c8767c5e1bfbb2c795e3fa5461346087e7e3b95c8a51f
PATCHES ${OPENSSL_PATCHES}
)

Expand Down
3 changes: 1 addition & 2 deletions ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "openssl",
"version": "3.0.5",
"port-version": 5,
"version": "3.0.7",
"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 Down
13 changes: 0 additions & 13 deletions ports/openssl/windows/flags.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 66bc81d..2364633 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1302,7 +1302,7 @@ my %targets = (
inherit_from => [ "BASE_Windows" ],
template => 1,
CC => "cl",
- CPP => '"$(CC)" /EP /C',
+ CPP => '$(CC) /EP /C',
CFLAGS => "/W3 /wd4090 /nologo",
coutflag => "/Fo",
LD => "link",
diff --git a/Configure b/Configure
index 8b234f6..e031768 100644
--- a/Configure
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5505,8 +5505,8 @@
"port-version": 4
},
"openssl": {
"baseline": "3.0.5",
"port-version": 5
"baseline": "3.0.7",
"port-version": 0
},
"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": "09701bf7506bd0d161bf671eff1c7f5b3d73e3a9",
"version": "3.0.7",
"port-version": 0
},
{
"git-tree": "067a790dfd1559e77d5a199ccbe982322882d667",
"version": "3.0.5",
Expand Down

0 comments on commit 09adfdc

Please sign in to comment.