Module: kamailio
Branch: master
Commit: c73a4127dfab65f2c17ea9bf21c94b102f4ec1ea
URL:
https://github.com/kamailio/kamailio/commit/c73a4127dfab65f2c17ea9bf21c94b1…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-08-17T16:07:58Z
tls: add parser logic for previous commits related to TLSv1.3
---
Modified: src/modules/tls/tls_config.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c73a4127dfab65f2c17ea9bf21c94b1…
Patch:
https://github.com/kamailio/kamailio/commit/c73a4127dfab65f2c17ea9bf21c94b1…
---
diff --git a/src/modules/tls/tls_config.c b/src/modules/tls/tls_config.c
index 4134aeb7a4..4cec01b0b6 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;
}