Skip to content

Commit 4b6c50d

Browse files
authored
[msquic] Allow windows build without openssl (microsoft#43031)
1 parent 597956c commit 4b6c50d

File tree

5 files changed

+46
-13
lines changed

5 files changed

+46
-13
lines changed

ports/msquic/portfile.cmake

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,20 @@ vcpkg_from_github(
1717
exports-for-msh3.diff
1818
)
1919

20-
vcpkg_from_github(
21-
OUT_SOURCE_PATH OPENSSL_SOURCE_PATH
22-
REPO quictls/openssl
23-
REF openssl-3.1.7-quic1
24-
SHA512 230f48a4ef20bfd492b512bd53816a7129d70849afc1426e9ce813273c01884d5474552ecaede05231ca354403f25e2325c972c9c7950ae66dae310800bd19e7
25-
HEAD_REF openssl-3.1.7+quic
26-
)
27-
if(NOT EXISTS "${QUIC_SOURCE_PATH}/submodules/openssl3/Configure")
28-
file(REMOVE_RECURSE "${QUIC_SOURCE_PATH}/submodules/openssl3")
29-
file(RENAME "${OPENSSL_SOURCE_PATH}" "${QUIC_SOURCE_PATH}/submodules/openssl3")
20+
set(QUIC_TLS "schannel")
21+
if("0-rtt" IN_LIST FEATURES)
22+
set(QUIC_TLS "openssl3")
23+
vcpkg_from_github(
24+
OUT_SOURCE_PATH OPENSSL_SOURCE_PATH
25+
REPO quictls/openssl
26+
REF openssl-3.1.7-quic1
27+
SHA512 230f48a4ef20bfd492b512bd53816a7129d70849afc1426e9ce813273c01884d5474552ecaede05231ca354403f25e2325c972c9c7950ae66dae310800bd19e7
28+
HEAD_REF openssl-3.1.7+quic
29+
)
30+
if(NOT EXISTS "${QUIC_SOURCE_PATH}/submodules/openssl3/Configure")
31+
file(REMOVE_RECURSE "${QUIC_SOURCE_PATH}/submodules/openssl3")
32+
file(RENAME "${OPENSSL_SOURCE_PATH}" "${QUIC_SOURCE_PATH}/submodules/openssl3")
33+
endif()
3034
endif()
3135

3236
vcpkg_from_github(
@@ -69,7 +73,7 @@ vcpkg_cmake_configure(
6973
SOURCE_PATH "${QUIC_SOURCE_PATH}"
7074
OPTIONS
7175
-DQUIC_SOURCE_LINK=OFF
72-
-DQUIC_TLS=openssl3
76+
-DQUIC_TLS=${QUIC_TLS}
7377
-DQUIC_USE_SYSTEM_LIBCRYPTO=OFF
7478
-DQUIC_BUILD_PERF=OFF
7579
-DQUIC_BUILD_TEST=OFF

ports/msquic/vcpkg.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
{
22
"name": "msquic",
33
"version": "2.4.7",
4+
"port-version": 1,
45
"description": "Cross-platform, C implementation of the IETF QUIC protocol",
56
"homepage": "https://github.com/microsoft/msquic",
67
"license": "MIT",
78
"supports": "!mingw & !(static & staticcrt)",
89
"dependencies": [
10+
{
11+
"name": "msquic",
12+
"features": [
13+
"0-rtt"
14+
],
15+
"platform": "!windows"
16+
},
917
{
1018
"name": "vcpkg-cmake",
1119
"host": true
@@ -14,5 +22,14 @@
1422
"name": "vcpkg-cmake-config",
1523
"host": true
1624
}
17-
]
25+
],
26+
"features": {
27+
"0-rtt": {
28+
"description": [
29+
"Enable 0-RTT connection support.",
30+
"This feature requires the use of (a fork of) OpenSSL 3 also on Windows."
31+
],
32+
"license": "Apache-2.0"
33+
}
34+
}
1835
}

scripts/test_ports/vcpkg-ci-msh3/vcpkg.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"description": "Validates msh3",
55
"dependencies": [
66
"msh3",
7+
{
8+
"name": "msquic",
9+
"features": [
10+
"0-rtt"
11+
],
12+
"platform": "windows & !static"
13+
},
714
{
815
"name": "vcpkg-cmake",
916
"host": true

versions/baseline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6182,7 +6182,7 @@
61826182
},
61836183
"msquic": {
61846184
"baseline": "2.4.7",
6185-
"port-version": 0
6185+
"port-version": 1
61866186
},
61876187
"mstch": {
61886188
"baseline": "1.0.2",

versions/m-/msquic.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "5e727b0b7e3bf5761f161c5f7ca8f24272a3f7f2",
5+
"version": "2.4.7",
6+
"port-version": 1
7+
},
38
{
49
"git-tree": "04855f9144f78f05b623916dc4d7310fdf8b5d29",
510
"version": "2.4.7",

0 commit comments

Comments
 (0)