uNetworking / uWebSockets

Simple, secure & standards compliant web server for the most demanding of applications
Apache License 2.0
17.24k stars 1.75k forks source link

Throw exception or stop the listener when SSL used but compiled without WITH_OPENSSL=1 #1459

Open dr-blade opened 2 years ago

dr-blade commented 2 years ago

There also seems to be no warnings/errors if uWS is compiled without "WITH_OPENSSL=1" . It compiles and executes without using an ssl context even when the code tells it to.

Originally posted by @yuumikazoomi in https://github.com/uNetworking/uWebSockets/issues/1132#issuecomment-800413035

ghost commented 2 years ago

It's kind of a core feature that TLS and TCP have the same interface, so your app doesn't have to be rewritten when moving to TLS. uWebSockets doesn't know whether or not uSockets is compiled with SSL or not.

uSockets just default to TCP if not compiled with SSL

ghost commented 2 years ago

You could make it so that uSockets fails of requested to do SSL without supporting it

uNetworkingAB commented 1 year ago

int us_protocol_support (int)

Could be checked in listen and just print a different message as a hint