diff --git a/src/modules/tls/tls_config.c b/src/modules/tls/tls_config.c index 4134aeb7a44..4cec01b0b67 100644 --- a/src/modules/tls/tls_config.c +++ b/src/modules/tls/tls_config.c @@ -125,6 +125,8 @@ static cfg_option_t methods[] = { {"TLSv1.1+", .val = TLS_USE_TLSv1_1_PLUS}, {"TLSv1.2", .val = TLS_USE_TLSv1_2}, {"TLSv1.2+", .val = TLS_USE_TLSv1_2_PLUS}, + {"TLSv1.3", .val = TLS_USE_TLSv1_3}, + {"TLSv1.3+", .val = TLS_USE_TLSv1_3_PLUS}, {0} }; @@ -528,6 +530,13 @@ int tls_parse_method(str* method) return -1; } #endif +#if OPENSSL_VERSION_NUMBER < 0x1010100fL + if(opt->val == TLS_USE_TLSv1_3 || opt->val == TLS_USE_TLSv1_3_PLUS) { + LM_ERR("tls v1.3 not supported by this libssl version: %ld\n", + (long)OPENSSL_VERSION_NUMBER); + return -1; + } +#endif return opt->val; }