Configure TLS version (with openssl) i.e. allow calling SSL_set_options #3279
Replies: 7 comments
-
We don't configure, we try to support all of them, if you have a problem please report all pertinent data, we do know what security conscious users are, our own TLS is 1.3. |
Beta Was this translation helpful? Give feedback.
-
Also, we support MbedTLS, OpenSSL, and WolfSSL, and won't introduce a function that is specific for OpenSSL. All necessary options are handled through the options structure. |
Beta Was this translation helpful? Give feedback.
-
First off English is not my native language, so I am not sure understand you first comment. The function does not have to be specific to openssl it could be an overridable function which exposes the I.e. (pseudo code): // ...
#ifndef MG_CUSTOMIZE_TLS_OPTION
void override_tls_options(struct mg_tls *tls) {}
#endif
// and then call `override_tls_options` somewhere in `mg_tls_init`
c->is_tls = 1;
c->is_tls_hs = 1;
MG_DEBUG(("%lu SSL %s OK", c->id, c->is_accepted ? "accept" : "client"));
override_tls_options(tls);
return; Then I could do: #define MG_CUSTOMIZE_TLS_OPTION
#include <mongoose.h>
// ...
void override_tls_options(struct mg_tls *tls) {
// ...
} |
Beta Was this translation helpful? Give feedback.
-
Mickem, please describe your real life problem, not what you think is the solution to the code. I don't think we'd split that, what we can do in that particular case is:
Though, being that something likely to be done on other libraries, I would look for some other generic way to select that. If you want to have total control, for some reason, and you provide an appealing use case, we might discuss how to provide that. If you are a paying customer, please contact Support as per your contract so we can serve your better. |
Beta Was this translation helpful? Give feedback.
-
Ohh, sorry... In other words I want to dynamically be able to switch supported tls version.
The reason for this is that some users use tools similar to https://github.com/testssl/testssl.sh where they validate the This was possible in the older version I used before upgrading. |
Beta Was this translation helpful? Give feedback.
-
// ... // and then call c->is_tls = 1; |
Beta Was this translation helpful? Give feedback.
-
@mickem your command of English is fine, if you don't have a problem then this belongs to "Feature Requests". Moved. Our main user base is embedded, we might add a switch to get 1.3 only or maybe choose 1.2 vs 1.3; something like my code example or perhaps an option to make it work on all supported libraries. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
A bit of background:
I have recently upgraded from an old version of mongoose where it was possible to override the tls options.
That seems no longer possible if I understand the code https://github.com/cesanta/mongoose/blob/master/mongoose.c#L14654-L14657 correctly.
I think it makes sense as some security conscious users might want to only allow tls 1.3.
It would be possible to either split
mg_tls_init
in two function one for creating the tls object and the other for configuring it allowing overriding the second function.Another option would be to call an empty new function in
mg_tls_init
which can be overriden to set custom tls options.Beta Was this translation helpful? Give feedback.
All reactions