feat crypto: support wolfssl library, help wanted
closes #498
Currently, this PR won't build by the reason described below.
This PR provides minimal changes which replaces internal usage of openssl. It does not checked for other libraries used in userver. Some openssl features does not implemented by wolfssl itself. (has found some typos during investigation, see https://github.com/wolfSSL/wolfssl/pull/7423).
BTW, wolfssl v5.7.0-stable requires few small patches which also included into the PR.
Finally, "short path" to support wolfssl is not available, because of the lib does not implements some of used functions. It also does not provide ENGINE_*, but have not been tried with wolfengine lib yet.
Worst thing is that wolfssl does not provides any CMS_* analogue to soft migrate onto this library, so, need some code branching using available functions in wolfssl.
PR is building with commands:
mkdir -p build_debug
cd build_debug
cmake \
-Wdev \
-DCMAKE_CXX_COMPILER=clang++-17 \
-DUSERVER_FEATURE_WOLFSSL=ON \
-DUSERVER_DOWNLOAD_PACKAGE_WOLFSSL=ON \
-DUSERVER_FEATURE_GRPC=OFF \
-DUSERVER_FEATURE_POSTGRESQL=OFF \
-DUSERVER_FEATURE_MYSQL=OFF \
-DUSERVER_FEATURE_STACKTRACE=OFF \
-DUSERVER_FEATURE_CLICKHOUSE=OFF \
-DUSERVER_USE_LD=lld \
..
Patch might be re-applied with command:
(test -d build_debug/_deps/wolfssl-src && cd build_debug/_deps/wolfssl-src && git checkout -- .)
Current errors will be attached in comments to this PR. Help needed with re-implementation of current crypto's features using wolfssl.
In my opinion, wolfssl is not production ready yet because of a lot of issues https://github.com/wolfSSL/wolfssl/labels/bug
Latest build log in attach. build-failed.log