Browse code

tls: exclude TLSv1.3 from OpenSSL > 1.1.0 < 1.1.1 for Debian stretch

Henning Westerholt authored on 19/08/2022 07:10:45
Showing 1 changed files
... ...
@@ -463,6 +463,7 @@ static void init_ssl_methods(void)
463 463
 	sr_tls_methods[TLS_USE_TLSv1_2 - 1].TLSMethodMin = TLS1_2_VERSION;
464 464
 	sr_tls_methods[TLS_USE_TLSv1_2 - 1].TLSMethodMax = TLS1_2_VERSION;
465 465
 
466
+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
466 467
 	sr_tls_methods[TLS_USE_TLSv1_3_cli - 1].TLSMethod = TLS_client_method();
467 468
 	sr_tls_methods[TLS_USE_TLSv1_3_cli - 1].TLSMethodMin = TLS1_3_VERSION;
468 469
 	sr_tls_methods[TLS_USE_TLSv1_3_cli - 1].TLSMethodMax = TLS1_3_VERSION;
... ...
@@ -472,6 +473,7 @@ static void init_ssl_methods(void)
472 473
 	sr_tls_methods[TLS_USE_TLSv1_3 - 1].TLSMethod = TLS_method();
473 474
 	sr_tls_methods[TLS_USE_TLSv1_3 - 1].TLSMethodMin = TLS1_3_VERSION;
474 475
 	sr_tls_methods[TLS_USE_TLSv1_3 - 1].TLSMethodMax = TLS1_3_VERSION;
476
+#endif
475 477
 
476 478
 	/* ranges of TLS versions (require a minimum TLS version) */
477 479
 	sr_tls_methods[TLS_USE_TLSv1_PLUS - 1].TLSMethod = TLS_method();
... ...
@@ -483,8 +485,10 @@ static void init_ssl_methods(void)
483 485
 	sr_tls_methods[TLS_USE_TLSv1_2_PLUS - 1].TLSMethod = TLS_method();
484 486
 	sr_tls_methods[TLS_USE_TLSv1_2_PLUS - 1].TLSMethodMin = TLS1_2_VERSION;
485 487
 
488
+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
486 489
 	sr_tls_methods[TLS_USE_TLSv1_3_PLUS - 1].TLSMethod = TLS_method();
487 490
 	sr_tls_methods[TLS_USE_TLSv1_3_PLUS - 1].TLSMethodMin = TLS1_3_VERSION;
491
+#endif
488 492
 
489 493
 #endif
490 494
 }