Skip to content

Commit e0453b9

Browse files
committed
fix tls1.3 in nginx
1 parent 8be19f1 commit e0453b9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server/plugins-available/nginx_plugin.inc.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,8 +1631,11 @@ function update($event_name, $data) {
16311631
// set logging variable
16321632
$vhost_data['logging'] = $web_config['logging'];
16331633

1634-
// Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time.
1635-
if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($app->system->getopensslversion(true), '1.1.1', '>='))) {
1634+
// Provide TLS 1.3 support if Nginx version is >= 1.13.0 and when it was linked against OpenSSL(>=1.1.1) at build time and when it was linked against OpenSSL(>=1.1.1) at runtime.
1635+
$nginx_openssl_ver = $app->system->exec_safe('nginx -V 2>&1 | grep OpenSSL | sed \'s/.*built\([a-zA-Z ]*\)OpenSSL \([0-9.]*\).*/\2/\'');
1636+
if(version_compare($app->system->getnginxversion(true), '1.13.0', '>=')
1637+
&& version_compare($nginx_openssl_ver, '1.1.1', '>=')
1638+
&& version_compare($app->system->getopensslversion(true), '1.1.1', '>=')) {
16361639
$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
16371640
$vhost_data['tls13_supported'] = "y";
16381641
}

0 commit comments

Comments
 (0)