mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 00:19:00 +08:00
407bc79b39
* Create package openssl3 * Create package openssl3 * Delete openssl3 * update version to 3.0.1 * Delete openssl3 * Update manifests to 3.0.1 * Fix download url * Update port version * Update version * Remove wrong port version * Fix errors * Fix license * Remove empty folders * Fix post-build errors * Add license field * Fix cmake for uwp * Remove patch file * format manifest * Update version file * Fix port version * version * Test: remove vcvarsall * version * fix version * version * Fix docs in cmake files as well * wrong branch * Add port openssl-1 * Fix directories * delete openssl-1 * [openssl-1] Add port * version * Fix UWP build * version * migrate uthenticode * version * Fix UWP build for librabbitmq * version * Fix UWP warnings * version * Fix patch * version * Disable C4996 on UWP * version * [idevicerestore] disable C4996 * remove warning fixes * Revert uthenticode * Final newlines * version * Remove winsock replace * version * [libwebsockets] Disable /WX on Windows * version * Typo * version * Disable C4996 in patch instead * version * [luasec] Use openssl-1 * version * revert luasec * migrate luasec * version * revert winsock * version * revert winsock * version * revert revert * version * Fix platform for luasec * Fix supports * version * . * version * uthenticode * libmysql * azure-c-shared-utility * version * remove azure-c-shared-utility * revert all * uthenticode * version * azure * version * libmysql * version * remove mysql * [libdatachannel] disable warnings on UWP * version * Fix patches * version * Add openssl-1 to CI baseline * openssl-1: check if copyright exists * version * revert azure * [libssh2] disable c4996 * version * [aws-sdk-cpp] -Wno-deprecated * version * fix aws patch * version * fix aws patch * version * [qpid-proton] disable warning * version * Fix patch * version * [librtmp] disable c4996 * version * [libu2f-server] disablec4996 * switch version scheme * version * [idevicerestore] disable c4996 * version * typo * version * fix cmake * version * fix cmake again * version * [uthenticode] patch to support Openssl 3 * version * fix idevicerestore * version * search for conflicting copyrights * version * Fix luasec * fix version * version * fix azure * version * Remove debug stuff * version * [open62541] patch * update port version * version * [libmysql] patch * version * Fix patch * version * Format openssl * Format openssl portfiles * Check for conflicting copyrights * Fix typo * Rename openssl-1 to openssl1 * Rename openssl-1 to openssl1 * version * Update ci baseline * version * resolve conflicting port versions * version * apply latest openssl security fix * version * Fix qpid-proton * version * retrigger Bbuild of qtbase * version * revert qtbase * Remove openssl1 * version * version * fix openssl_version_fix Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
73 lines
2.5 KiB
Diff
73 lines
2.5 KiB
Diff
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index 75b82ee..47bed29 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 1.1
|
|
- COMPONENTS Crypto
|
|
- REQUIRED
|
|
-)
|
|
+find_package(OpenSSL REQUIRED)
|
|
|
|
add_library("${PROJECT_NAME}" uthenticode.cpp)
|
|
|
|
@@ -38,7 +34,7 @@ else ()
|
|
target_link_libraries("${PROJECT_NAME}" PUBLIC pe-parse::pe-parser-library)
|
|
endif ()
|
|
|
|
-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 8422cc3..938d8b8 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);
|
|
|
|
/* Convenient self-releasing aliases for libcrypto and custom ASN.1 types.
|
|
*/
|
|
@@ -56,7 +57,7 @@ using ASN1_OBJECT_ptr = std::unique_ptr<ASN1_OBJECT, decltype(&ASN1_OBJECT_free)
|
|
using ASN1_TYPE_ptr = std::unique_ptr<ASN1_TYPE, decltype(&ASN1_TYPE_free)>;
|
|
using OpenSSL_ptr = std::unique_ptr<char, decltype(&OpenSSL_free)>;
|
|
using BN_ptr = std::unique_ptr<BIGNUM, decltype(&BN_free)>;
|
|
-using STACK_OF_X509_ptr = std::unique_ptr<STACK_OF(X509), decltype(&sk_X509_free)>;
|
|
+using STACK_OF_X509_ptr = std::unique_ptr<STACK_OF(X509), decltype(&SK_X509_free)>;
|
|
|
|
using SectionList = std::vector<const peparse::bounded_buffer *>;
|
|
|
|
diff --git a/src/uthenticode.cpp b/src/uthenticode.cpp
|
|
index b1be0bc..7043589 100644
|
|
--- a/src/uthenticode.cpp
|
|
+++ b/src/uthenticode.cpp
|
|
@@ -39,6 +39,11 @@ IMPLEMENT_ASN1_FUNCTIONS(Authenticode_SpcIndirectDataContent)
|
|
void OpenSSL_free(void *ptr) {
|
|
OPENSSL_free(ptr);
|
|
}
|
|
+
|
|
+void SK_X509_free(stack_st_X509 *ptr) {
|
|
+ sk_X509_free(ptr);
|
|
+}
|
|
+
|
|
// clang-format on
|
|
} // namespace impl
|
|
|
|
@@ -252,7 +257,7 @@ std::vector<Certificate> SignedData::get_signers() const {
|
|
if (signers_stack_ptr == nullptr) {
|
|
return {};
|
|
}
|
|
- auto signers_stack = impl::STACK_OF_X509_ptr(signers_stack_ptr, sk_X509_free);
|
|
+ auto signers_stack = impl::STACK_OF_X509_ptr(signers_stack_ptr, impl::SK_X509_free);
|
|
|
|
std::vector<Certificate> signers;
|
|
for (auto i = 0; i < sk_X509_num(signers_stack.get()); ++i) {
|