[wolfssl] Add feature flags dtls and secret-callback (#33295)

* wolfssl: add features `dtls` and `secret-callback`

* bump port version

* add missing cmake options for wolfssl

* update version database

* increment port version to resolve conflicts

* update version database

* fix newline

* update version database again

* set CMAKE_C_FLAGS using detected configuration

* update version database

* update version database
This commit is contained in:
Lukas Rost 2023-11-09 20:24:46 +01:00 committed by GitHub
parent a37c3c2399
commit 7c5a86fcc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 3 deletions

View File

@ -7,6 +7,22 @@ vcpkg_from_github(
PATCHES
)
if ("dtls" IN_LIST FEATURES)
set(ENABLE_DTLS yes)
else()
set(ENABLE_DTLS no)
endif()
vcpkg_cmake_get_vars(cmake_vars_file)
include("${cmake_vars_file}")
foreach(config RELEASE DEBUG)
string(APPEND VCPKG_COMBINED_C_FLAGS_${config} " -DWOLFSSL_ALT_CERT_CHAINS -DWOLFSSL_DES_ECB -DWOLFSSL_CUSTOM_OID -DHAVE_OID_ENCODING -DWOLFSSL_CERT_GEN -DWOLFSSL_ASN_TEMPLATE -DWOLFSSL_KEY_GEN -DHAVE_PKCS7 -DHAVE_AES_KEYWRAP -DWOLFSSL_AES_DIRECT -DHAVE_X963_KDF")
if ("secret-callback" IN_LIST FEATURES)
string(APPEND VCPKG_COMBINED_C_FLAGS_${config} " -DHAVE_SECRET_CALLBACK")
endif()
endforeach()
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
@ -21,8 +37,13 @@ vcpkg_cmake_configure(
-DWOLFSSL_OCSPSTAPLING_V2=yes
-DWOLFSSL_CRL=yes
-DWOLFSSL_DES3=yes
-DCMAKE_C_FLAGS='-DWOLFSSL_ALT_CERT_CHAINS\ -DWOLFSSL_DES_ECB\ -DWOLFSSL_CUSTOM_OID\ -DHAVE_OID_ENCODING\ -DWOLFSSL_CERT_GEN\ -DWOLFSSL_ASN_TEMPLATE\ -DWOLFSSL_KEY_GEN\ -DHAVE_PKCS7\ -DHAVE_AES_KEYWRAP\ -DWOLFSSL_AES_DIRECT\ -DHAVE_X963_KDF'
-DWOLFSSL_DTLS=${ENABLE_DTLS}
-DWOLFSSL_DTLS13=${ENABLE_DTLS}
-DWOLFSSL_DTLS_CID=${ENABLE_DTLS}
OPTIONS_RELEASE
-DCMAKE_C_FLAGS=${VCPKG_COMBINED_C_FLAGS_RELEASE}
OPTIONS_DEBUG
-DCMAKE_C_FLAGS=${VCPKG_COMBINED_C_FLAGS_DEBUG}
-DWOLFSSL_DEBUG=yes)
vcpkg_cmake_install()

View File

@ -1,6 +1,7 @@
{
"name": "wolfssl",
"version": "5.6.4",
"port-version": 1,
"description": "TLS and Cryptographic library for many platforms",
"homepage": "https://wolfssl.com",
"license": "GPL-2.0-or-later",
@ -13,6 +14,18 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-cmake-get-vars",
"host": true
}
]
],
"features": {
"dtls": {
"description": "DTLS support"
},
"secret-callback": {
"description": "Enables callback to provide TLS keys for debugging"
}
}
}

View File

@ -9022,7 +9022,7 @@
},
"wolfssl": {
"baseline": "5.6.4",
"port-version": 0
"port-version": 1
},
"wolftpm": {
"baseline": "2.7.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fb8d59a3965864a1330fa99418eef1df5c354a50",
"version": "5.6.4",
"port-version": 1
},
{
"git-tree": "65cc018a18a436969ef0fa7ff531d83994326f43",
"version": "5.6.4",