warmcat / libwebsockets

canonical libwebsockets.org networking library
https://libwebsockets.org
Other
4.73k stars 1.48k forks source link

compilation issue with libwebsocket with openssl version OpenSSL v3.3.1 #3209

Open sush126 opened 3 weeks ago

sush126 commented 3 weeks ago

Hi @lws-team , On the Windows platform, I am getting the following error. Could you please let me know if there is support for OpenSSL version 3.3.1?

Error :

9>D:\libweb4.3.2\libwebsockets\lib\tls\openssl\openssl-server.c(436,9): error C2220: the following warning is treated as an error 9>D:\libweb4.3.2\libwebsockets\lib\tls\openssl\openssl-server.c(436,9): warning C4996: 'EC_KEY_new_by_curve_name': Since OpenSSL 3.0 9>D:\libweb4.3.2\libwebsockets\lib\tls\openssl\openssl-server.c(442,2): warning C4996: 'EC_KEY_free': Since OpenSSL 3.0 9>D:\libweb4.3.2\libwebsockets\lib\tls\openssl\openssl-server.c(485,11): warning C4996: 'EVP_PKEY_get1_EC_KEY': Since OpenSSL 3.0 9>D:\libweb4.3.2\libwebsockets\lib\tls\openssl\openssl-server.c(493,2): warning C4996: 'EC_KEY_free': Since OpenSSL 3.0

lws-team commented 3 weeks ago

Should be enough to use -DDISABLE_WERROR=1 at cmake

sush126 commented 3 weeks ago

i have tryied but same issue , please find cmakecache for reference. i am using below command to build lws : cmake -G "NMake Makefiles" -DLWS_WITHOUT_EXTENSIONS=OFF -DLWS_SSL_SERVER_WITH_ECDH_CERT=1 -DDISABLE_WERROR=1 -DCMAKE_BUILD_TYPE=RELEASE -DOPENSSL_ROOT_DIR="C:\\Program Files\\OpenSSL-Win64" -DCMAKE_INSTALL_PREFIX="C:\\Program Files\\libwebsockets" .. image

lws-team commented 3 weeks ago

Dunno... if you are using some GUI or whatever for msvc, you can try turning it off in there. Otherwise you'll have to look at the toolchain commandline (ie, compiler) and see what is really set there and debug from there.