Fix compile errors and add some vcpkg features support
This PR fixes compile error in:
asn.c when OPENSSL_EXTRA is not defined
evp.c because it uses uint32_t but didn't include <stdio.h>
And it adds support to handle cmake options to enable or disable some macros definitions which will be used to enable and disable vcpkg features Currently this deals with sni, exdata and no stub functions
Can one of the admins verify this patch?
Hi @cppdev123
Thanks for sharing these! I would like to keep this PR focused on the Cmake build. I will open a separate PR for the other fixes you identified.
https://github.com/wolfSSL/wolfssl/pull/5599
@cppdev123
Please push a commit that reverts the non-cmake fixes.
@haydenroche5
For the vcpkg builds, there is a way to configure from the vcpkg command, but it requires the library CMakeLists.txt to use on/off instead of yes/no. Does this sounds like a feasible change for wolfSSL? Could there be other implications?
@embhorn I reverted non cmake changes. vcpkg on/off options could be transformed to yes/no as follows:
foreach(FET ${FEATURE_OPTIONS})
string(REPLACE "=ON" "=yes" FET ${FET})
string(REPLACE "=OFF" "=no" FET ${FET})
set(FEATURE_OPTIONS_YES_NO ${FEATURE_OPTIONS_YES_NO} ${FET})
endforeach()
then use ${FEATURE_OPTIONS_YES_NO} instead of ${FEATURE_OPTIONS}
I tested this and it works well for the features I tested for
I think this is better than altering all currently used settings
Bringing this up to date here (https://github.com/wolfSSL/wolfssl/pull/7655). Thanks @cppdev123.