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

[vcpkg] Add sources for TLS 1.2 downloader tool. #15516

Merged
merged 10 commits into from
Jan 13, 2021
1 change: 1 addition & 0 deletions scripts/azure-pipelines/Format-CxxCode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Push-Location $toolsrc
try
{
$files = Get-ChildItem -Recurse -LiteralPath "$toolsrc/src" -Filter '*.cpp'
$files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/src" -Filter '*.c'
$files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/include/vcpkg" -Filter '*.h'
$files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/include/vcpkg-test" -Filter '*.h'
$files += Get-Item "$toolsrc/include/pch.h"
Expand Down
16 changes: 16 additions & 0 deletions scripts/azure-pipelines/signing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
inputs:
InputType: 'CommandLine'
arguments: 'analyze "$(Build.StagingDirectory)\vcpkg.exe"'
- task: BinSkim@3
inputs:
InputType: 'CommandLine'
arguments: 'analyze "$(Build.StagingDirectory)\tls12-download.exe"'
- task: PublishBuildArtifacts@1
displayName: 'Publish vcpkg.exe'
inputs:
Expand All @@ -64,6 +68,18 @@ jobs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.pdb'
ArtifactName: 'Windows'
publishLocation: 'Container'
- task: PublishBuildArtifacts@1
displayName: 'Publish tls12-download.exe'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\tls12-download.exe'
ArtifactName: 'Windows'
publishLocation: 'Container'
- task: PublishBuildArtifacts@1
displayName: 'Publish tls12-download.pdb'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\tls12-download.pdb'
ArtifactName: 'Windows'
publishLocation: 'Container'
- task: MicroBuildCleanup@1
condition: succeededOrFailed()
displayName: MicroBuild Cleanup
Expand Down
3 changes: 3 additions & 0 deletions scripts/azure-pipelines/windows/signing.signproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<FilesToSign Include="$(IntermediateOutputPath)\vcpkg.exe">
<Authenticode>Microsoft400</Authenticode>
</FilesToSign>
<FilesToSign Include="$(IntermediateOutputPath)\tls12-download.exe">
<Authenticode>Microsoft400</Authenticode>
</FilesToSign>
</ItemGroup>

<ImportGroup Label="ExtensionTargets">
Expand Down
23 changes: 21 additions & 2 deletions toolsrc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
if(WIN32)
# 3.16 for MSVC_RUNTIME_LIBRARY
cmake_minimum_required(VERSION 3.16)
else()
cmake_minimum_required(VERSION 3.14)
endif()

project(vcpkg CXX)
project(vcpkg C CXX)
include(cmake/utilities.cmake)

# ===============
Expand Down Expand Up @@ -178,6 +183,18 @@ if(VCPKG_BUILD_FUZZING)
vcpkg_target_add_warning_options(vcpkg-fuzz)
endif()


# === Target: tls12-download ===

set(TLS12_DOWNLOAD_SOURCES src/tls12-download.c)
if(WIN32)
add_executable(tls12-download ${TLS12_DOWNLOAD_SOURCES})
set_property(TARGET tls12-download PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded")
set_property(TARGET tls12-download APPEND PROPERTY LINK_OPTIONS "$<IF:$<CONFIG:Debug>,,/ENTRY:entry>")
target_link_libraries(tls12-download winhttp)
endif()


# === Target: format ===

find_program(CLANG_FORMAT clang-format)
Expand All @@ -196,5 +213,7 @@ if(CLANG_FORMAT)
COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_TEST_SOURCES}
COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_TEST_INCLUDES}

COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_FUZZ_SOURCES})
COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_FUZZ_SOURCES}
COMMAND ${CLANG_FORMAT} -i -verbose ${TLS12_DOWNLOAD_SOURCES}
)
endif()
Loading