Topic: undefined reference wolfSSL_CTX_UseSNI wolfSSL_CTX_UseSupportedCurve


I am using wolfssl with the intel SGX on Linux (Ubuntu 20.04).
For that, I build the static library following the instructions of the example: … /SGX_Linux
I successfully run the provided example.

I am trying to locally run a code I just start work with. I attach the make file of the trusted code. I compile and I get the error

/usr/local/bin/ld: Enclave/Wolfssl_Enclave.o: in function `enc_wolfSSL_CTX_UseSupportedCurve':
Wolfssl_Enclave.c:(.text+0x145): undefined reference to `wolfSSL_CTX_UseSupportedCurve'
/usr/local/bin/ld: Enclave/Wolfssl_Enclave.o: in function `enc_wolfSSL_set_SNI':
Wolfssl_Enclave.c:(.text+0x294): undefined reference to `wolfSSL_CTX_UseSNI'
collect2: error: ld returned 1 exit status
make[1]: *** [] Error 1

following a given answer on this forum I also included the <wolfssl/options.h> before all other wolfSSL headers

I kind of lost in here


Re: undefined reference wolfSSL_CTX_UseSNI wolfSSL_CTX_UseSupportedCurve

The main wolfSSL library will need compiled with SNI and Supported curves enabled. If adding in the functions enc_wolfSSL_CTX_UseSupportedCurve and enc_wolfSSL_set_SNI it looks like by default those are off with the library build and the example. SNI is enabled with the HAVE_SNI macro and supported curves are enabled with the HAVE_SUPPORTED_CURVES and HAVE_TLS_EXTENSIONS macros.