]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] Add TLS v1.3 support.
authorAndrey Volk <andywolk@gmail.com>
Tue, 12 May 2020 15:30:48 +0000 (19:30 +0400)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 18:59:57 +0000 (21:59 +0300)
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c

index 1ffd39dc6e84e2c4feb68c5bc585462ba64d3966..9a739088df735d2ce8d6cae6bfa4f27641a9b3be 100644 (file)
@@ -461,6 +461,7 @@ typedef enum {
        SOFIA_TLS_VERSION_TLSv1 = (1 << 2),
        SOFIA_TLS_VERSION_TLSv1_1 = (1 << 3),
        SOFIA_TLS_VERSION_TLSv1_2 = (1 << 4),
+       SOFIA_TLS_VERSION_TLSv1_3 = (1 << 5),
 } sofia_tls_version_t;
 
 typedef enum {
index 3682bc454aadeef8cf434bc7ea94ba42b15b0684..bcf72e2b7dba08bd85928e0a113dc6b40a637d98 100644 (file)
@@ -4633,6 +4633,7 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
                                        profile->tls_version = SOFIA_TLS_VERSION_TLSv1;
                                        profile->tls_version |= SOFIA_TLS_VERSION_TLSv1_1;
                                        profile->tls_version |= SOFIA_TLS_VERSION_TLSv1_2;
+                                       profile->tls_version |= SOFIA_TLS_VERSION_TLSv1_3;
                                        profile->tls_timeout = 300;
                                        profile->mflags = MFLAG_REFER | MFLAG_REGISTER;
                                        profile->server_rport_level = 1;
@@ -5878,6 +5879,8 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
                                                                profile->tls_version |= SOFIA_TLS_VERSION_TLSv1_1;
                                                        if (n==7 && !strncasecmp(ps, "tlsv1.2", n))
                                                                profile->tls_version |= SOFIA_TLS_VERSION_TLSv1_2;
+                                                       if (n==7 && !strncasecmp(ps, "tlsv1.3", n))
+                                                               profile->tls_version |= SOFIA_TLS_VERSION_TLSv1_3;
                                                        ps=pe+1;
                                                }
                                        } else if (!strcasecmp(var, "tls-timeout") && !zstr(val)) {