wolfssl icon indicating copy to clipboard operation
wolfssl copied to clipboard

Can't build ECH example on M1 Mac

Open FrontMage opened this issue 8 months ago • 23 comments

Version

5.6.3

Description

Trying to make https://wolfssl.com/encrypted-client-hello-ech-now-supported-wolfssl/ this work, by compiling code from https://gist.github.com/jpbland1/ad46617fcc40934b252ce031c7aa5969 on M1 Mac. After building the wolfssl lib by using

./configure --host=aarch64-apple-darwin
make
sudo make install

then ran

gcc ech_cloudflare.c

gave these errors:

ld: Undefined symbols:
  _wolfSSL_CTX_UseSNI, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_CTX_free, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_CTX_load_verify_locations, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_CTX_new, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_Cleanup, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_GetEchConfigs, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_Init, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_SetEchConfigs, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_connect, referenced from:
      _main in ech-f9216f.o
      _main in ech-f9216f.o
  _wolfSSL_free, referenced from:
      _main in ech-f9216f.o
      _main in ech-f9216f.o
  _wolfSSL_get_error, referenced from:
      _main in ech-f9216f.o
      _main in ech-f9216f.o
      _main in ech-f9216f.o
  _wolfSSL_new, referenced from:
      _main in ech-f9216f.o
      _main in ech-f9216f.o
  _wolfSSL_read, referenced from:
      _main in ech-f9216f.o
  _wolfSSL_set_fd, referenced from:
      _main in ech-f9216f.o
      _main in ech-f9216f.o
  _wolfSSL_write, referenced from:
      _main in ech-f9216f.o
  _wolfTLSv1_3_client_method, referenced from:
      _main in ech-f9216f.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Are there any other steps to take before building this ECH example or the code from the gist need an update? Thx for the help!

FrontMage avatar Oct 30 '23 12:10 FrontMage