wolfSSL / wolfssl

The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
https://www.wolfssl.com
GNU General Public License v2.0
2.36k stars 834 forks source link

CMake buid scripts don't offer `--enable-keylog-export` like option #8165

Open redbaron opened 1 week ago

redbaron commented 1 week ago

Version

5.7.4

Description

configure script has --enable-keylog-export param which defines WOLFSSL_SSLKEYLOGFILE. This feature doesn't seem to be supported by CMake build scripts.

dgarske commented 1 week ago

@bigbrett can you review this bug report and evaluate effort to fix?

bigbrett commented 1 week ago

@redbaron Thanks for pointing that out, we can add it in.

In the meantime, if you ensure the C macros -DSHOW_SECRETS -DHAVE_SECRET_CALLBACK -DWOLFSSL_SSLKEYLOGFILE -DWOLFSSL_KEYLOG_EXPORT_WARNED are defined, it will have the equivalent behavior.

redbaron commented 1 week ago

@bigbrett , yeah passing -DWOLFSSL_DEFINITIONS with list of defines does the trick nicely in all cases so far, but first class CMake support will help discovering these features easier.

In general it seems that autotools has more love: 148 vs 34 commits this year so far.

$ git log  CMakeLists.txt cmake |grep -F ' 2024 ' | wc -l
34

$ git log  configure.ac |grep -F ' 2024 ' | wc -l  
148

It is probably because autotools is more popular among embedded devs, but your build instructions don't mention CMake either :(

bigbrett commented 1 week ago

@redbaron Yep I agree, our CMake coverage does often slip behind. wolfSSL has a long history with autotools, and for better or for worse, that is our default supported build system. So we do rely on the community for issues like this in keeping our CMake support up to date. Community PRs for CMake support are always appreciated :)

redbaron commented 1 week ago

@bigbrett ,

Community PRs for CMake support are always appreciated :)

took opportunity to add more ergonomic helper to define build option: https://github.com/wolfSSL/wolfssl/pull/8174