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.34k stars 831 forks source link

TLS 1.3 not usable for me #6258

Closed joeftiger closed 1 year ago

joeftiger commented 1 year ago

Version

5.6.0 (979707380c677dfa65e3ba48f19e149773a4a32d)

Description

I am trying to use TLS 1.3 for my small playground server. CLion (IDE) keeps reporting Use of undeclared identifier 'wolfTLSv1_3_client_method' and trying to compile and run the server results in a SIGSEGV crash immediately.

I've tried compiling wolfSSL with both make:

./autogen.sh
./configure --enable-tls13
make
make check
sudo make install

and cmake:

mkdir build
cd build
cmake .. -DWOLFSSL_TLS13=yes
cmake --build .
sudo cmake --install .

but TLS 1.3 is just not available for me to use. Is there something else I must do to enable it? I went through lots of official docs now, but am unable to fix it.

embhorn commented 1 year ago

Hi @joeftiger

Thanks for contacting wolfSSL Support. You'll need to include the configuration header before any other wolfSSL includes:

#ifndef WOLFSSL_USER_SETTINGS
    #include <wolfssl/options.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>

#include <wolfssl/ssl.h>

Let us know if that resolves the issue.

Thanks, @embhorn - wolfSSL Support

joeftiger commented 1 year ago

Thank you very muchb @embhorn, that fixed it. Maybe this can be included in the docs online? The docs for wolftlsv1_3_server_method() here don't mention it, e.g.

embhorn commented 1 year ago

Hi @joeftiger

Excellent! If you haven't already, I recommend checking out our examples repository: https://github.com/wolfSSL/wolfssl-examples

I'll go ahead and mark this issue as resolved.

Cheers, Eric