mirror of
https://github.com/brunoos/luasec.git
synced 2024-12-28 05:18:21 +01:00
Let the library choose the min and max versions
Some protocols can be disable with 'options'.
This commit is contained in:
parent
93e0e8cc64
commit
fdb2fa5f59
@ -66,9 +66,9 @@ static int set_option_flag(const char *opt, unsigned long *flag)
|
|||||||
*/
|
*/
|
||||||
static const SSL_METHOD* str2method(const char *method, int *vmin, int *vmax)
|
static const SSL_METHOD* str2method(const char *method, int *vmin, int *vmax)
|
||||||
{
|
{
|
||||||
if (!strcmp(method, "any") || !strcmp(method, "sslv23")) {
|
if (!strcmp(method, "any") || !strcmp(method, "sslv23")) { // 'sslv23' is deprecated
|
||||||
*vmin = TLS1_VERSION;
|
*vmin = 0;
|
||||||
*vmax = TLS1_2_VERSION;
|
*vmax = 0;
|
||||||
return TLS_method();
|
return TLS_method();
|
||||||
}
|
}
|
||||||
else if (!strcmp(method, "tlsv1")) {
|
else if (!strcmp(method, "tlsv1")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user