Revert "lrkproxy: Add new features : TURN support, behind_nat support, subset of...
[sip-router] / src / modules / tls / tls_init.c
index 1b88aa0..e6d0060 100644 (file)
@@ -401,12 +401,6 @@ static void init_ssl_methods(void)
        ssl_methods[TLS_USE_TLSv1_2 - 1] = TLSv1_2_method();
 #endif
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
-       ssl_methods[TLS_USE_TLSv1_3_cli - 1] = TLSv1_3_client_method();
-       ssl_methods[TLS_USE_TLSv1_3_srv - 1] = TLSv1_3_server_method();
-       ssl_methods[TLS_USE_TLSv1_3 - 1] = TLSv1_3_method();
-#endif
-
        /* ranges of TLS versions (require a minimum TLS version) */
        ssl_methods[TLS_USE_TLSv1_PLUS - 1] = (void*)TLS_OP_TLSv1_PLUS;
 
@@ -418,9 +412,6 @@ static void init_ssl_methods(void)
        ssl_methods[TLS_USE_TLSv1_2_PLUS - 1] = (void*)TLS_OP_TLSv1_2_PLUS;
 #endif
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
-       ssl_methods[TLS_USE_TLSv1_3_PLUS - 1] = (void*)TLS_OP_TLSv1_3_PLUS;
-#endif
 #else
        /* openssl 1.1.0+ */
        memset(sr_tls_methods, 0, sizeof(sr_tls_methods));
@@ -472,6 +463,7 @@ static void init_ssl_methods(void)
        sr_tls_methods[TLS_USE_TLSv1_2 - 1].TLSMethodMin = TLS1_2_VERSION;
        sr_tls_methods[TLS_USE_TLSv1_2 - 1].TLSMethodMax = TLS1_2_VERSION;
 
+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
        sr_tls_methods[TLS_USE_TLSv1_3_cli - 1].TLSMethod = TLS_client_method();
        sr_tls_methods[TLS_USE_TLSv1_3_cli - 1].TLSMethodMin = TLS1_3_VERSION;
        sr_tls_methods[TLS_USE_TLSv1_3_cli - 1].TLSMethodMax = TLS1_3_VERSION;
@@ -481,6 +473,7 @@ static void init_ssl_methods(void)
        sr_tls_methods[TLS_USE_TLSv1_3 - 1].TLSMethod = TLS_method();
        sr_tls_methods[TLS_USE_TLSv1_3 - 1].TLSMethodMin = TLS1_3_VERSION;
        sr_tls_methods[TLS_USE_TLSv1_3 - 1].TLSMethodMax = TLS1_3_VERSION;
+#endif
 
        /* ranges of TLS versions (require a minimum TLS version) */
        sr_tls_methods[TLS_USE_TLSv1_PLUS - 1].TLSMethod = TLS_method();
@@ -492,8 +485,10 @@ static void init_ssl_methods(void)
        sr_tls_methods[TLS_USE_TLSv1_2_PLUS - 1].TLSMethod = TLS_method();
        sr_tls_methods[TLS_USE_TLSv1_2_PLUS - 1].TLSMethodMin = TLS1_2_VERSION;
 
+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
        sr_tls_methods[TLS_USE_TLSv1_3_PLUS - 1].TLSMethod = TLS_method();
        sr_tls_methods[TLS_USE_TLSv1_3_PLUS - 1].TLSMethodMin = TLS1_3_VERSION;
+#endif
 
 #endif
 }