libwebsockets icon indicating copy to clipboard operation
libwebsockets copied to clipboard

wolfssl implicit declaration of function ‘SSL_CTX_set_tmp_ecdh’

Open alex09x opened this issue 6 years ago • 5 comments

Hello, i need build libwebsockets with wolfssl. Ubuntu 20.04.1 LTS

i'm build wolfssl-4.5.0

./configure --enable-opensslextra --enable-sniffer --enable-static

checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports the include directive... yes (GNU style) checking whether make supports nested variables... yes checking whether UID '1000' is supported by ustar format... yes checking whether GID '1000' is supported by ustar format... yes checking how to create a ustar tar archive... gnutar checking dependency style of gcc... gcc3 checking whether make supports nested variables... (cached) yes checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /usr/bin/dd checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether the -Werror option is usable... yes checking for simple visibility declarations... yes checking size of long long... 8 checking size of long... 8 checking size of time_t... 8 checking for __uint128_t... yes checking for gethostbyname... yes checking for getaddrinfo... yes checking for gettimeofday... yes checking for gmtime_r... yes checking for inet_ntoa... yes checking for memset... yes checking for socket... yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking for socket in -lnetwork... no checking whether byte ordering is bigendian... no checking for size_t... yes checking for uint8_t... yes checking dependency style of gcc... gcc3 checking for cos in -lm... yes checking for thread local storage (TLS) class... __thread checking for debug... no checking whether gcc is Clang... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking whether more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... yes checking pcap/pcap.h usability... no checking pcap/pcap.h presence... no checking for pcap/pcap.h... no configure: WARNING: cannot enable sniffer test without having libpcap available. checking for fast RSA... no checking for library containing gethostbyname... none required checking for library containing socket... none required checking for vcs system... none checking for vcs checkout... no checking whether the linker accepts -Werror... yes checking whether the linker accepts -z relro -z now... yes checking whether the linker accepts -pie... yes checking whether C compiler accepts -Werror... yes checking whether C compiler accepts -Wno-pragmas... yes checking whether C compiler accepts -Wall... yes checking whether C compiler accepts -Wno-strict-aliasing... yes checking whether C compiler accepts -Wextra... yes checking whether C compiler accepts -Wunknown-pragmas... yes checking whether C compiler accepts -Wthis-test-should-fail... no checking whether C compiler accepts --param=ssp-buffer-size=1... yes checking whether C compiler accepts -Waddress... yes checking whether C compiler accepts -Warray-bounds... yes checking whether C compiler accepts -Wbad-function-cast... yes checking whether C compiler accepts -Wchar-subscripts... yes checking whether C compiler accepts -Wcomment... yes checking whether C compiler accepts -Wfloat-equal... yes checking whether C compiler accepts -Wformat-security... yes checking whether C compiler accepts -Wformat=2... yes checking whether C compiler accepts -Wmaybe-uninitialized... yes checking whether C compiler accepts -Wmissing-field-initializers... yes checking whether C compiler accepts -Wmissing-noreturn... yes checking whether C compiler accepts -Wmissing-prototypes... yes checking whether C compiler accepts -Wnested-externs... yes checking whether C compiler accepts -Wnormalized=id... yes checking whether C compiler accepts -Woverride-init... yes checking whether C compiler accepts -Wpointer-arith... yes checking whether C compiler accepts -Wpointer-sign... yes checking whether C compiler accepts -Wredundant-decls... yes checking whether C compiler accepts -Wshadow... yes checking whether C compiler accepts -Wshorten-64-to-32... no checking whether C compiler accepts -Wsign-compare... yes checking whether C compiler accepts -Wstrict-overflow=1... yes checking whether C compiler accepts -Wstrict-prototypes... no checking whether C compiler accepts -Wswitch-enum... yes checking whether C compiler accepts -Wundef... yes checking whether C compiler accepts -Wunused... yes checking whether C compiler accepts -Wunused-result... yes checking whether C compiler accepts -Wunused-variable... yes checking whether C compiler accepts -Wwrite-strings... yes checking whether C compiler accepts -fwrapv... yes creating wolfssl-config - generic 4.5.0 for -lwolfssl checking the number of available CPUs... 32 configure: adding automake macro support configure: creating aminclude.am configure: added jobserver support to make for 33 jobs checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating stamp-h config.status: creating Makefile config.status: creating wolfssl/version.h config.status: creating wolfssl/options.h config.status: creating cyassl/options.h config.status: creating support/wolfssl.pc config.status: creating rpm/spec config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands


Running make clean...

Generating user options header... option w/o begin -D is -Wno-pragmas, not saving to wolfssl/options.h option w/o begin -D is -Wall, not saving to wolfssl/options.h option w/o begin -D is -Wno-strict-aliasing, not saving to wolfssl/options.h option w/o begin -D is -Wextra, not saving to wolfssl/options.h option w/o begin -D is -Wunknown-pragmas, not saving to wolfssl/options.h option w/o begin -D is --param=ssp-buffer-size=1, not saving to wolfssl/options.h option w/o begin -D is -Waddress, not saving to wolfssl/options.h option w/o begin -D is -Warray-bounds, not saving to wolfssl/options.h option w/o begin -D is -Wbad-function-cast, not saving to wolfssl/options.h option w/o begin -D is -Wchar-subscripts, not saving to wolfssl/options.h option w/o begin -D is -Wcomment, not saving to wolfssl/options.h option w/o begin -D is -Wfloat-equal, not saving to wolfssl/options.h option w/o begin -D is -Wformat-security, not saving to wolfssl/options.h option w/o begin -D is -Wformat=2, not saving to wolfssl/options.h option w/o begin -D is -Wmaybe-uninitialized, not saving to wolfssl/options.h option w/o begin -D is -Wmissing-field-initializers, not saving to wolfssl/options.h option w/o begin -D is -Wmissing-noreturn, not saving to wolfssl/options.h option w/o begin -D is -Wmissing-prototypes, not saving to wolfssl/options.h option w/o begin -D is -Wnested-externs, not saving to wolfssl/options.h option w/o begin -D is -Wnormalized=id, not saving to wolfssl/options.h option w/o begin -D is -Woverride-init, not saving to wolfssl/options.h option w/o begin -D is -Wpointer-arith, not saving to wolfssl/options.h option w/o begin -D is -Wpointer-sign, not saving to wolfssl/options.h option w/o begin -D is -Wredundant-decls, not saving to wolfssl/options.h option w/o begin -D is -Wshadow, not saving to wolfssl/options.h option w/o begin -D is -Wsign-compare, not saving to wolfssl/options.h option w/o begin -D is -Wstrict-overflow=1, not saving to wolfssl/options.h option w/o begin -D is -Wswitch-enum, not saving to wolfssl/options.h option w/o begin -D is -Wundef, not saving to wolfssl/options.h option w/o begin -D is -Wunused, not saving to wolfssl/options.h option w/o begin -D is -Wunused-result, not saving to wolfssl/options.h option w/o begin -D is -Wunused-variable, not saving to wolfssl/options.h option w/o begin -D is -Wwrite-strings, not saving to wolfssl/options.h option w/o begin -D is -fwrapv, not saving to wolfssl/options.h option w/o begin -D is -fvisibility=hidden, not saving to wolfssl/options.h not outputting (N)DEBUG to wolfssl/options.h option w/o begin -D is -pthread, not saving to wolfssl/options.h option w/o begin -D is -Wall, not saving to wolfssl/options.h option w/o begin -D is -Wno-unused, not saving to wolfssl/options.h option w/o begin -D is -O2, not saving to wolfssl/options.h


Configuration summary for wolfssl version 4.5.0

  • Installation prefix: /usr/local
  • System type: pc-linux-gnu
  • Host CPU: x86_64
  • C Compiler: gcc
  • C Flags: -Wno-pragmas -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas --param=ssp-buffer-size=1 -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmaybe-uninitialized -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=id -Woverride-init -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv
  • C++ Compiler:
  • C++ Flags:
  • CPP Flags:
  • CCAS Flags:
  • LIB Flags: -pie -z relro -z now
  • Debug enabled: no
  • Coverage enabled:
  • Warnings as failure: no
  • make -j: 33
  • VCS checkout: no

Features

  • Single threaded: no
  • Filesystem: yes
  • OpenSSH Build: no
  • OpenSSL Extra API: yes
  • OpenSSL Coexist: no
  • Old Names: yes
  • Max Strength Build: no
  • Distro Build: no
  • fastmath: yes
  • Assembly Allowed: yes
  • sniffer: yes
  • snifftest: no
  • ARC4: no
  • AES: yes
  • AES-NI: no
  • AES-CBC: yes
  • AES-GCM: yes
  • AES-CCM: no
  • AES-CTR: no
  • DES3: no
  • IDEA: no
  • Camellia: no
  • NULL Cipher: no
  • MD5: yes
  • RIPEMD: no
  • SHA: yes
  • SHA-224: yes
  • SHA-384: yes
  • SHA-512: yes
  • SHA3: yes
  • SHAKE256: yes
  • BLAKE2: no
  • CMAC: no
  • keygen: no
  • certgen: no
  • certreq: no
  • certext: no
  • certgencache: no
  • HC-128: no
  • RABBIT: no
  • CHACHA: yes
  • Hash DRBG: yes
  • PWDBASED: yes
  • scrypt: no
  • wolfCrypt Only: no
  • HKDF: yes
  • X9.63 KDF: no
  • MD4: no
  • PSK: no
  • Poly1305: yes
  • LEANPSK: no
  • LEANTLS: no
  • RSA: yes
  • RSA-PSS: yes
  • DSA: no
  • DH: yes
  • DH Default Parameters: yes
  • ECC: yes
  • ECC Custom Curves no
  • CURVE25519: no
  • ED25519: no
  • CURVE448: no
  • ED448: no
  • FPECC: no
  • ECC_ENCRYPT: no
  • ASN: yes
  • Anonymous cipher: no
  • CODING: yes
  • MEMORY: yes
  • I/O POOL: no
  • LIGHTY: no
  • HAPROXY: no
  • STUNNEL: no
  • Apache httpd: no
  • NGINX: no
  • ASIO: no
  • LIBWEBSOCKETS: no
  • Qt no
  • Qt Unit Testing no
  • SIGNAL: no
  • ERROR_STRINGS: yes
  • DTLS: no
  • SCTP: no
  • Indefinite Length: no
  • Multicast: no
  • SSL v3.0 (Old): no
  • TLS v1.0 (Old): no
  • TLS v1.1 (Old): yes
  • TLS v1.2: yes
  • TLS v1.3: yes
  • Post-handshake Auth: no
  • Early Data: no
  • Send State in HRR Cookie: no
  • OCSP: no
  • OCSP Stapling: no
  • OCSP Stapling v2: no
  • CRL: no
  • CRL-MONITOR: no
  • Persistent session cache: no
  • Persistent cert cache: no
  • Atomic User Record Layer: no
  • Public Key Callbacks: no
  • NTRU: no
  • QSH: no
  • Whitewood netRandom: no
  • Server Name Indication: no
  • ALPN: no
  • Maximum Fragment Length: no
  • Trusted CA Indication: no
  • Truncated HMAC: no
  • Supported Elliptic Curves: yes
  • FFDHE only in client: no
  • Session Ticket: no
  • Extended Master Secret: yes
  • Renegotiation Indication: no
  • Secure Renegotiation: no
  • Fallback SCSV: no
  • All TLS Extensions: no
  • PKCS#7 no
  • wolfSSH no
  • wolfSCEP no
  • Secure Remote Password no
  • Small Stack: no
  • valgrind unit tests: no
  • LIBZ: no
  • Examples: yes
  • User Crypto: no
  • Fast RSA: no
  • Single Precision: no
  • Async Crypto: no
  • PKCS#11: no
  • PKCS#12: yes
  • Cavium Nitox: no
  • Cavium Octeon (Sync): no
  • Intel Quick Assist: no
  • ARM ASM: no
  • AES Key Wrap: no
  • Write duplicate: no
  • Xilinx Hardware Acc.: no
  • Inline Code: yes
  • Linux AF_ALG: no
  • Linux devcrypto: no
  • Crypto callbacks: no

make make install

Libraries have been installed in: /usr/local/lib

git clone https://github.com/warmcat/libwebsockets.git mkdir build && cd build cmake .. -DLWS_ROLE_WS=1 -DLWS_WITHOUT_EXTENSIONS=0 -DLWS_WITH_WOLFSSL=1 -DLWS_WOLFSSL_INCLUDE_DIRS=/usr/local/include/wolfssl -DLWS_WOLFSSL_LIBRARIES=/usr/local/lib/libwolfssl.so

-- The C compiler identification is GNU 9.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Compiled with LWS_WITH_DIR and LWS_WITH_LEJP_CONF -- Found Git: /usr/bin/git (found version "2.25.1") Git commit hash: v4.1.0-rc2-8-g27841ba4 -- Performing Test LWS_HAVE_inline -- Performing Test LWS_HAVE_inline - Success -- Performing Test LWS_HAVE___inline__ -- Performing Test LWS_HAVE___inline__ - Success -- Performing Test LWS_HAVE___inline -- Performing Test LWS_HAVE___inline - Success -- Performing Test LWS_HAVE_MALLOC_TRIM -- Performing Test LWS_HAVE_MALLOC_TRIM - Success -- Performing Test LWS_HAVE_MALLOC_USABLE_SIZE -- Performing Test LWS_HAVE_MALLOC_USABLE_SIZE - Success -- Looking for fork -- Looking for fork - found -- Looking for getenv -- Looking for getenv - found -- Looking for malloc -- Looking for malloc - found -- Looking for memset -- Looking for memset - found -- Looking for realloc -- Looking for realloc - found -- Looking for socket -- Looking for socket - found -- Looking for strerror -- Looking for strerror - found -- Looking for vfork -- Looking for vfork - found -- Looking for execvpe -- Looking for execvpe - found -- Looking for getifaddrs -- Looking for getifaddrs - found -- Looking for snprintf -- Looking for snprintf - found -- Looking for _snprintf -- Looking for _snprintf - not found -- Looking for _vsnprintf -- Looking for _vsnprintf - not found -- Looking for getloadavg -- Looking for getloadavg - found -- Looking for atoll -- Looking for atoll - found -- Looking for _atoi64 -- Looking for _atoi64 - not found -- Looking for _stat32i64 -- Looking for _stat32i64 - not found -- Looking for clock_gettime -- Looking for clock_gettime - found -- Looking for in6addr.h -- Looking for in6addr.h - not found -- Looking for memory.h -- Looking for memory.h - found -- Looking for netinet/in.h -- Looking for netinet/in.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stdlib.h -- Looking for stdlib.h - found -- Looking for strings.h -- Looking for strings.h - found -- Looking for string.h -- Looking for string.h - found -- Looking for sys/prctl.h -- Looking for sys/prctl.h - found -- Looking for sys/socket.h -- Looking for sys/socket.h - found -- Looking for sys/sockio.h -- Looking for sys/sockio.h - not found -- Looking for sys/stat.h -- Looking for sys/stat.h - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for unistd.h -- Looking for unistd.h - found -- Looking for vfork.h -- Looking for vfork.h - not found -- Looking for sys/capability.h -- Looking for sys/capability.h - not found -- Looking for malloc.h -- Looking for malloc.h - found -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for inttypes.h -- Looking for inttypes.h - found -- Looking for cap_set_flag in cap -- Looking for cap_set_flag in cap - not found -- Looking for zlib.h -- Looking for zlib.h - found -- Looking for 3 include files stdlib.h, ..., string.h -- Looking for 3 include files stdlib.h, ..., string.h - found -- Performing Test LWS_HAS_INTPTR_T -- Performing Test LWS_HAS_INTPTR_T - Success -- Performing Test LWS_HAS_PTHREAD_SETNAME_NP -- Performing Test LWS_HAS_PTHREAD_SETNAME_NP - Failed -- Performing Test LWS_HAS_GETOPT_LONG -- Performing Test LWS_HAS_GETOPT_LONG - Success -- Performing Test LWS_HAVE_VISIBILITY -- Performing Test LWS_HAVE_VISIBILITY - Success -- Performing Test LWS_GCC_HAS_IGNORED_QUALIFIERS -- Performing Test LWS_GCC_HAS_IGNORED_QUALIFIERS - Success -- Performing Test LWS_GCC_HAS_TYPE_LIMITS -- Performing Test LWS_GCC_HAS_TYPE_LIMITS - Success -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") zlib/miniz include dirs: /usr/include zlib/miniz libraries: /usr/lib/x86_64-linux-gnu/libz.so -- Looking for eventfd_read -- Looking for eventfd_read - found -- Performing Test LWS_HAVE_PIPE2 -- Performing Test LWS_HAVE_PIPE2 - Success -- Performing Test LWS_HAVE_TCP_USER_TIMEOUT -- Performing Test LWS_HAVE_TCP_USER_TIMEOUT - Success Compiling with SSL support wolfSSL include dir: /usr/local/include/wolfssl wolfSSL libraries: /usr/local/lib/libwolfssl.so LIB_LIST /usr/lib/x86_64-linux-gnu/libz.so;/usr/local/lib/libwolfssl.so -- Looking for wolfSSL_SSL_CTX_set1_param -- Looking for wolfSSL_SSL_CTX_set1_param - not found -- Looking for wolfSSL_SSL_set_info_callback -- Looking for wolfSSL_SSL_set_info_callback - not found -- Looking for wolfSSL_X509_VERIFY_PARAM_set1_host -- Looking for wolfSSL_X509_VERIFY_PARAM_set1_host - found -- Looking for wolfSSL_RSA_set0_key -- Looking for wolfSSL_RSA_set0_key - found -- Looking for wolfSSL_X509_get_key_usage -- Looking for wolfSSL_X509_get_key_usage - not found -- Looking for wolfSSL_EVP_PKEY_new_raw_private_key -- Looking for wolfSSL_EVP_PKEY_new_raw_private_key - not found -- Looking for wolfSSL_SSL_CTX_get0_certificate -- Looking for wolfSSL_SSL_CTX_get0_certificate - not found -- Looking for wolfSSL_SSL_get0_alpn_selected -- Looking for wolfSSL_SSL_get0_alpn_selected - not found -- Looking for wolfSSL_SSL_set_alpn_protos -- Looking for wolfSSL_SSL_set_alpn_protos - not found -- Looking for wolfSSL_EVP_aes_128_cfb8 -- Looking for wolfSSL_EVP_aes_128_cfb8 - not found -- Looking for wolfSSL_EVP_aes_128_cfb128 -- Looking for wolfSSL_EVP_aes_128_cfb128 - not found -- Looking for wolfSSL_EVP_aes_192_cfb8 -- Looking for wolfSSL_EVP_aes_192_cfb8 - not found -- Looking for wolfSSL_EVP_aes_192_cfb128 -- Looking for wolfSSL_EVP_aes_192_cfb128 - not found -- Looking for wolfSSL_EVP_aes_256_cfb8 -- Looking for wolfSSL_EVP_aes_256_cfb8 - not found -- Looking for wolfSSL_EVP_aes_256_cfb128 -- Looking for wolfSSL_EVP_aes_256_cfb128 - not found -- Looking for wolfSSL_EVP_aes_128_xts -- Looking for wolfSSL_EVP_aes_128_xts - not found -- Looking for wolfSSL_RSA_verify_pss_mgf1 -- Looking for wolfSSL_RSA_verify_pss_mgf1 - not found -- Looking for wolfSSL_HMAC_CTX_new -- Looking for wolfSSL_HMAC_CTX_new - found -- Looking for wolfSSL_SSL_CTX_set_ciphersuites -- Looking for wolfSSL_SSL_CTX_set_ciphersuites - not found -- Looking for wolfSSL_EVP_PKEY_new_raw_private_key -- Looking for wolfSSL_EVP_PKEY_new_raw_private_key - not found -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS - Failed -- Performing Test LWS_HAVE_EVP_MD_CTX_free -- Performing Test LWS_HAVE_EVP_MD_CTX_free - Failed -- Looking for wolfSSL_ECDSA_SIG_set0 -- Looking for wolfSSL_ECDSA_SIG_set0 - not found -- Looking for wolfSSL_BN_bn2binpad -- Looking for wolfSSL_BN_bn2binpad - not found -- Looking for wolfSSL_EVP_aes_128_wrap -- Looking for wolfSSL_EVP_aes_128_wrap - not found -- Looking for wolfSSL_EC_POINT_get_affine_coordinates -- Looking for wolfSSL_EC_POINT_get_affine_coordinates - not found -- Looking for wolfSSL_SSL_CTX_load_verify_file -- Looking for wolfSSL_SSL_CTX_load_verify_file - not found -- Looking for wolfSSL_SSL_CTX_load_verify_dir -- Looking for wolfSSL_SSL_CTX_load_verify_dir - not found -- Looking for wolfSSL_TLS_client_method -- Looking for wolfSSL_TLS_client_method - not found -- Looking for wolfSSL_TLSv1_2_client_method -- Looking for wolfSSL_TLSv1_2_client_method - not found GENCERTS = 0 DIR /home/ok/aws2/libwebsockets/build CMP /home/ok/aws2/libwebsockets/cmake -- Configuring done -- Generating done -- Build files have been written to: /home/ok/aws2/libwebsockets/build

make

Scanning dependencies of target GENHDR [ 0%] Creating build include dir [ 0%] Built target GENHDR Scanning dependencies of target websockets_shared [ 1%] Building C object lib/CMakeFiles/websockets_shared.dir/plat/unix/unix-caps.c.o [ 2%] Building C object lib/CMakeFiles/websockets_shared.dir/plat/unix/unix-misc.c.o [ 2%] Building C object lib/CMakeFiles/websockets_shared.dir/plat/unix/unix-init.c.o [ 3%] Building C object lib/CMakeFiles/websockets_shared.dir/plat/unix/unix-file.c.o [ 4%] Building C object lib/CMakeFiles/websockets_shared.dir/plat/unix/unix-pipe.c.o [ 4%] Building C object lib/CMakeFiles/websockets_shared.dir/plat/unix/unix-service.c.o [ 5%] Building C object lib/CMakeFiles/websockets_shared.dir/plat/unix/unix-sockets.c.o [ 6%] Building C object lib/CMakeFiles/websockets_shared.dir/plat/unix/unix-fds.c.o [ 6%] Building C object lib/CMakeFiles/websockets_shared.dir/tls/tls.c.o [ 7%] Building C object lib/CMakeFiles/websockets_shared.dir/tls/tls-network.c.o [ 8%] Building C object lib/CMakeFiles/websockets_shared.dir/tls/openssl/openssl-tls.c.o [ 8%] Building C object lib/CMakeFiles/websockets_shared.dir/tls/openssl/openssl-x509.c.o [ 9%] Building C object lib/CMakeFiles/websockets_shared.dir/tls/openssl/openssl-ssl.c.o [ 10%] Building C object lib/CMakeFiles/websockets_shared.dir/tls/tls-server.c.o [ 10%] Building C object lib/CMakeFiles/websockets_shared.dir/tls/openssl/openssl-server.c.o /home/ok/aws2/libwebsockets/lib/tls/openssl/openssl-server.c: In function ‘lws_tls_server_certs_load’: /home/ok/aws2/libwebsockets/lib/tls/openssl/openssl-server.c:408:2: error: implicit declaration of function ‘SSL_CTX_set_tmp_ecdh’; did you mean ‘SSL_CTX_set_tmp_dh’? [-Werror=implicit-function-declaration] 408 | SSL_CTX_set_tmp_ecdh(vhost->tls.ssl_ctx, ecdh); | ^~~~~~~~~~~~~~~~~~~~ | SSL_CTX_set_tmp_dh /home/ok/aws2/libwebsockets/lib/tls/openssl/openssl-server.c:421:38: error: dereferencing pointer to incomplete type ‘lws_tls_ctx’ {aka ‘struct WOLFSSL_CTX’} 421 | x = sk_X509_value(vhost->tls.ssl_ctx->extra_certs, 0); | ^~ cc1: all warnings being treated as errors make[2]: *** [lib/CMakeFiles/websockets_shared.dir/build.make:245: lib/CMakeFiles/websockets_shared.dir/tls/openssl/openssl-server.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1352: lib/CMakeFiles/websockets_shared.dir/all] Error 2 make: *** [Makefile:163: all] Error 2

help me please fix it

alex09x avatar Aug 30 '20 05:08 alex09x

Wolfssl tls build of lws is tested in Sai CI, it builds fine.

https://libwebsockets.org/sai/index.html?task=ed58e3f8aa7c0faadb56ace952fe78c16fa7ec2303869a1c5ad2055d0087dd28

The wolfssl that's building against was configured with

--enable-libwebsockets --enable-alpn CFLAGS=-DHAVE_EX_DATA

lws-team avatar Aug 30 '20 05:08 lws-team

thank you it's works

alex09x avatar Aug 30 '20 06:08 alex09x

hm, i'm build https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/ws-client/minimal-ws-client-binance

ldd minimal_ws_client_binance_c linux-vdso.so.1 (0x00007fff6a5be000) libwebsockets.so.16 => /usr/local/lib/libwebsockets.so.16 (0x00007f7ec81e7000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7ec7fda000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7ec7fbe000) libwolfssl.so.24 => /usr/local/lib/libwolfssl.so.24 (0x00007f7ec7ec7000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7ec7ea4000) /lib64/ld-linux-x86-64.so.2 (0x00007f7ec826b000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7ec7d55000)

[2020/08/30 09:15:56:2520] U: LWS minimal binance client [2020/08/30 09:15:56:2521] N: LWS: 4.0.99-v4.1.0-rc2-8-g27841ba4, loglevel 1031 [2020/08/30 09:15:56:2521] N: NET CLI SRV H1 H2 WS IPv6-absent [2020/08/30 09:15:56:9396] E: CLIENT_CONNECTION_ERROR: connect unk -188 [2020/08/30 09:15:58:8132] E: CLIENT_CONNECTION_ERROR: connect unk -188 [2020/08/30 09:16:02:0191] E: CLIENT_CONNECTION_ERROR: connect unk -188 [2020/08/30 09:16:06:2026] E: CLIENT_CONNECTION_ERROR: connect unk -188 [2020/08/30 09:16:10:9096] E: CLIENT_CONNECTION_ERROR: connect unk -188 [2020/08/30 09:16:17:6439] E: CLIENT_CONNECTION_ERROR: connect unk -188 [2020/08/30 09:16:17:6439] E: callback_minimal: connection attempts exhausted [2020/08/30 09:16:17:6439] U: Completed

help me please

alex09x avatar Aug 30 '20 06:08 alex09x

This is caused by not providing wolfssl with any trusted CA to confirm the peer's tls certificate against. If you want to use these tls libs, you have to understand and deal with this detail.

With the default tls lib OpenSSL, your system has a (huge) trusted cert bundle opensll can refer to by reading it off the filesystem to find out if the peer CA is trusted. With mbedtls or wolfssl designed more or embedded systems, they don't come with their own multimegabyte cert bundle and leave it up to you to tell it specifically what CA it is supposed to trust for validation.

Here is a patch (also on master lws) that makes the ws-client-binance example trust the necessary DigiCert Global Root CA that the binance site cert needs us to trust to validate it

https://libwebsockets.org/git/libwebsockets/commit/include/libwebsockets/lws-misc.h?id=afa4e8c87f6f09d91ee694531475549569ec1444

lws-team avatar Aug 30 '20 07:08 lws-team

This is caused by not providing wolfssl with any trusted CA to confirm the peer's tls certificate against. If you want to use these tls libs, you have to understand and deal with this detail.

With the default tls lib OpenSSL, your system has a (huge) trusted cert bundle opensll can refer to by reading it off the filesystem to find out if the peer CA is trusted. With mbedtls or wolfssl designed more or embedded systems, they don't come with their own multimegabyte cert bundle and leave it up to you to tell it specifically what CA it is supposed to trust for validation.

Here is a patch (also on master lws) that makes the ws-client-binance example trust the necessary DigiCert Global Root CA that the binance site cert needs us to trust to validate it

https://libwebsockets.org/git/libwebsockets/commit/include/libwebsockets/lws-misc.h?id=afa4e8c87f6f09d91ee694531475549569ec1444

good, big thanks

alex09x avatar Aug 30 '20 08:08 alex09x