https api changed? #2341
-
Hi, I was trying to use https for mongoose following this guide https://mongoose.ws/documentation/tutorials/http-client/#build-with-tls-support. However the implementation seems to have changed quite a bit? When I compile and run I get the message TLS is not enabled. This is how I try to enable TLS, not sure if this is enough... Could anybody help with this please? :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Since you don't say, I will assume that you are trying to build using Github HEAD. If you still want to build using HEAD, check the examples and the source code, the API is still not documented as it is not stable and might change again. Lines 3 to 11 in 8c03aa2 make clean all CFLAGS_EXTRA="-DMG_TLS=MG_TLS_OPENSSL -lssl -lcrypto"
Note: I assume you are looping when calling |
Beta Was this translation helpful? Give feedback.
Since you don't say, I will assume that you are trying to build using Github HEAD.
We are transitioning our TLS API, adding new features and libs; at this very moment some things do not work with OpenSSL and our docs and examples in HEAD are out of sync. The message you post occurs when there is no TLS code in Mongoose, the way to enable TLS has also changed and by building this way you are not enabling it.
The docs are correct for 7.11 if you pick it up from the releases section and use the examples there; I suggest you start with 7.11 and later migrate to HEAD.
https://github.com/cesanta/mongoose/releases/tag/7.11
https://mongoose.ws/documentation/tutorials/tls/
Check the examples, the …