Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WolfSSL not compatible with LWS due to missing SSL_CTX_use_certificate_ASN1 #3072

Open
0xg0nz0 opened this issue Feb 23, 2024 · 0 comments
Open

Comments

@0xg0nz0
Copy link

0xg0nz0 commented Feb 23, 2024

Error:

[build] /workspaces/iggy-cpp-client/build/libwebsockets/src/lws/lib/tls/openssl/openssl-client.c:1100:21: error: implicit declaration of function 'SSL_CTX_use_certificate_ASN1'; did you mean 'SSL_CTX_use_certificate_file'? [-Werror=implicit-function-declaration]
[build]  1100 |                 n = SSL_CTX_use_certificate_ASN1(vh->tls.ssl_client_ctx,
[build]       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build]       |                     SSL_CTX_use_certificate_file

In WolfSSL the OpenSSL compatibility layer is incomplete, and this is one of the missing functions. You need to load the certificate from a file or wolfSSL_CTX_use_certificate_buffer and pass SSL_FILETYPE_ASN1 to specify ASN.1 format certificates.

Versions:

  • CMake 3.22.1
  • gcc 11.4.0
  • Ubuntu 22.04
  • WolfSSL 5.6.6 built from vcpkg
  • LWS v4.3.3 from GitHub
  • args: -DLWS_WITH_WOLFSSL=1 -DLWS_WOLFSSL_INCLUDE_DIRS=${WOLFSSL_INCLUDE_DIR} -DLWS_WOLFSSL_LIBRARIES=${WOLFSSL_INSTALL_DIR}/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant