-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unclear how to add openssl support #88
Comments
Hi @stoneburner , Thank you for opening this issue. The Could you provide more details about your environment? OS? OpenSSL version? facil.io version? Thank you! |
the os is mac os catalina 10.15 i was able to compile the .a file using cmake, but i would prefer to just use the code - so i tried to figure out what i need to #define in order to use openssl as dynamic lib. so my goal would be to use facil.io as "code library (so i can also remove some not needed parts) and load openssl as dynamic library. an example on how to connect as client with https and upgrade the connection to websockets would be highly appreciated :) |
The CMake support might not work unless you update the CMake file to test for (and add) OpenSSL. However, the GNU
This is exactly how facil.io was meant to be used.
I think you might be referring to the OpenSSL development draft version (not yet released, might be insecure, and probably not supported by facil.io, since it's breaking the 1.1.1 API). Or you might be referring to LibreSSL which is the library shipped with MacOS. The latest OpenSSL release is the 1.1.1 version, AFAIK. Could you try installing the OpenSSL 1.1.1 version and see if
I'd love to, but honestly I'm a little swamped right now. I think that the simple WebSocket client API (which I expect to change in version 0.8.0) doesn't support TLS just yet. The existing approach needs to use Another approach would be to change these lines of code to create an automatic TLS anonymous context when missing: facil.io/lib/facil/http/http.c Lines 1061 to 1066 in c130672
By updating these lines, you could use the existing websocket client with a You would also need to add memory management for the new TLS object, such as destroying the self-made TLS context after the call to Good Luck! |
Hi, i was able to use facil.io as websocket client, now i need tls support and tried to add openssl...
I cloned openssl, compiled it and added the headers to the include search path - but if i include <fio_tls.h> and call
fio_tls_s * tls = fio_tls_new("www.example.com", NULL, NULL, NULL);
then i get the output:FATAL: No supported SSL/TLS library available.
i also tried setting some defines i found in the source:
this did not change anything, unfortunately
The text was updated successfully, but these errors were encountered: