Skip to content

Commit 3464f77

Browse files
sbSteveKxiazhvera
andauthored
CD fix for Windows TLS 1.3 (#603)
Co-authored-by: Vera Xia <[email protected]>
1 parent f9df207 commit 3464f77

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
cmake_minimum_required(VERSION 3.9...3.31)
2+
3+
24
project(aws-crt-nodejs C)
35
option(BUILD_DEPS "Builds aws common runtime dependencies as part of build, only do this if you don't want to control your dependency chain." ON)
46

continuous-delivery/build-binaries-win64.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
set AWS_CRT_WINDOWS_SDK_VERSION=10.0.17763.0
2+
13
npm install || goto error
24

35
:error

scripts/build_dependencies/build_step_cmake.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ module.exports = {
9898
options.cMakeOptions.CMAKE_OSX_DEPLOYMENT_TARGET = "10.15";
9999
}
100100

101+
// Set the target windows SDK version. We have a minimum required version of the Windows SDK needed for schannel.h with SCH_CREDENTIALS and
102+
// TLS_PARAMETERS. These are required to build Windows Binaries with TLS 1.3 support.
103+
// Please note CMAKE_SYSTEM_NAME is only valid for cmake < 3.27. Currently, we dont have a proper way to support cmake 3.27+
104+
// Introduced in cmake 3.27+, the generator string supports a version field to specify the windows sdk version in use
105+
// https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_PLATFORM.html#variable:CMAKE_GENERATOR_PLATFORM
106+
if(process.env.AWS_CRT_WINDOWS_SDK_VERSION && platform == 'win32') {
107+
options.cMakeOptions.CMAKE_SYSTEM_VERSION = process.env.AWS_CRT_WINDOWS_SDK_VERSION
108+
}
109+
101110
// Convert any -D arguments to this script to cmake -D arguments
102111
for (const arg of process.argv) {
103112
if (arg.startsWith('-D')) {

0 commit comments

Comments
 (0)