wolfssl icon indicating copy to clipboard operation
wolfssl copied to clipboard

Fix compile errors and add some vcpkg features support

Open cppdev123 opened this issue 3 years ago • 5 comments

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

cppdev123 avatar Sep 16 '22 19:09 cppdev123

Can one of the admins verify this patch?

wolfSSL-Bot avatar Sep 16 '22 19:09 wolfSSL-Bot

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

embhorn avatar Sep 16 '22 20:09 embhorn

@cppdev123

Please push a commit that reverts the non-cmake fixes.

embhorn avatar Sep 16 '22 20:09 embhorn

@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 avatar Sep 16 '22 21:09 embhorn

@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

cppdev123 avatar Sep 16 '22 21:09 cppdev123

Bringing this up to date here (https://github.com/wolfSSL/wolfssl/pull/7655). Thanks @cppdev123.

JacobBarthelmeh avatar Jun 18 '24 16:06 JacobBarthelmeh