diff options
Diffstat (limited to 'vcpkg/ports/uthenticode')
| -rw-r--r-- | vcpkg/ports/uthenticode/openssl.patch | 38 | ||||
| -rw-r--r-- | vcpkg/ports/uthenticode/portfile.cmake | 22 | ||||
| -rw-r--r-- | vcpkg/ports/uthenticode/vcpkg.json | 20 |
3 files changed, 80 insertions, 0 deletions
diff --git a/vcpkg/ports/uthenticode/openssl.patch b/vcpkg/ports/uthenticode/openssl.patch new file mode 100644 index 0000000..685f5d6 --- /dev/null +++ b/vcpkg/ports/uthenticode/openssl.patch @@ -0,0 +1,38 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 90f871d..8fd64b2 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -3,11 +3,7 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
+ project(uthenticode)
+
+ find_package(pe-parse REQUIRED)
+-find_package(
+- OpenSSL 3.0
+- COMPONENTS Crypto
+- REQUIRED
+-)
++find_package(OpenSSL REQUIRED)
+
+ add_library("${PROJECT_NAME}" uthenticode.cpp)
+
+@@ -32,7 +28,7 @@ set_target_properties("${PROJECT_NAME}" PROPERTIES PUBLIC_HEADER "include/uthent
+
+ target_link_libraries("${PROJECT_NAME}" PUBLIC pe-parse::pe-parse)
+
+-target_link_libraries("${PROJECT_NAME}" PUBLIC OpenSSL::Crypto)
++target_link_libraries("${PROJECT_NAME}" PUBLIC OpenSSL::SSL OpenSSL::Crypto)
+
+ install(
+ TARGETS "${PROJECT_NAME}"
+diff --git a/src/include/uthenticode.h b/src/include/uthenticode.h
+index 223d662..07e5bc3 100644
+--- a/src/include/uthenticode.h
++++ b/src/include/uthenticode.h
+@@ -48,6 +48,7 @@ DECLARE_ASN1_FUNCTIONS(Authenticode_SpcIndirectDataContent)
+ * So we wrap it here for use with unique_ptr.
+ */
+ void OpenSSL_free(void *ptr);
++void SK_X509_free(stack_st_X509 *ptr);
+
+ /* Since OpenSSL 3.0.0 SK_X509_free is defined as a macro, which we can't use with decltype.
+ * So we wrap it here for use with unique_ptr.
diff --git a/vcpkg/ports/uthenticode/portfile.cmake b/vcpkg/ports/uthenticode/portfile.cmake new file mode 100644 index 0000000..0509f61 --- /dev/null +++ b/vcpkg/ports/uthenticode/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO trailofbits/uthenticode + REF "v${VERSION}" + SHA512 447c1edd2fcd7ba6e960ef5caf32f2b0b9b8bd6b83e5ec02313ff6ae2063bc37a4c250cfdcd57d0717ba93f783c4c8390280edd54a2f63f53c4185faeab6610a + HEAD_REF master + PATCHES + openssl.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/uthenticode) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/uthenticode/vcpkg.json b/vcpkg/ports/uthenticode/vcpkg.json new file mode 100644 index 0000000..f6a2282 --- /dev/null +++ b/vcpkg/ports/uthenticode/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "uthenticode", + "version": "2.0.1", + "port-version": 1, + "description": "A cross-platform library for verifying Authenticode signatures", + "homepage": "https://github.com/trailofbits/uthenticode", + "supports": "!uwp", + "dependencies": [ + "openssl", + "pe-parse", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |