Topic: undefined reference wolfSSL_CTX_UseSNI wolfSSL_CTX_UseSupportedCurve

Hello.

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:
https://github.com/wolfSSL/wolfssl-exam … /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

Enclave/Wolfssl_Enclave.c
/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]: *** [sgx_t.mk:195: enclave.so] 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

Share

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.

Regards,
Jacob

Share