Skip to content

Commit 1429726

Browse files
committed
trimmed the code since it seems to be enough to provide TLS 1.3 when Nginx was linked against OpenSSL 1.1.1 at build time
1 parent 9fbc4aa commit 1429726

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

server/plugins-available/nginx_plugin.inc.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,20 +1622,15 @@ function update($event_name, $data) {
16221622
$vhost_data['logging'] = $web_config['logging'];
16231623

16241624
// check if OpenSSL and Nginx supports TLS 1.3
1625-
$nginx_version = $app->system->getnginxversion(true);
1626-
$openssl_version = $app->system->getopensslversion(true);
1627-
16281625
$output = $app->system->exec_safe('nginx -V 2>&1');
16291626

16301627
if(preg_match('/built with OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
16311628
$nginx_openssl_ver = $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) ? '.' . $matches[5] : '');
16321629
}
16331630

1634-
if(version_compare($app->system->getopensslversion(true), $nginx_openssl_ver, '>=')) {
1635-
if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($app->system->getopensslversion(true), '1.1.1', '>='))) {
1636-
$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
1637-
$vhost_data['tls13_available'] = $app->system->getopensslversion(true);
1638-
}
1631+
if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($nginx_openssl_ver, '1.1.1', '>='))) {
1632+
$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
1633+
$vhost_data['tls13_available'] = $nginx_openssl_ver;
16391634
}
16401635

16411636
$tpl->setVar($vhost_data);

0 commit comments

Comments
 (0)