Skip to content

Commit 0fa67c4

Browse files
committed
updated Nginx OpenSSL version detection
1 parent 9ffe217 commit 0fa67c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/plugins-available/nginx_plugin.inc.php

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

16241624
// check if OpenSSL and Nginx supports TLS 1.3
1625-
//$app->log("Found OpenSSL version: " . $app->system->getopensslversion($get_minor = true), LOGLEVEL_DEBUG);
16261625
$nginx_version = $app->system->getnginxversion(true);
16271626
$openssl_version = $app->system->getopensslversion(true);
16281627

1629-
$app->system->exec_safe('nginx -V 2>&1', $output, $return_var);
1628+
$output = $app->system->exec_safe('nginx -V 2>&1');
16301629

16311630
if(preg_match('/built with OpenSSL\s*(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
16321631
$nginx_openssl_ver = $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) ? '.' . $matches[5] : '');
1633-
}
1632+
}
16341633

16351634
if(version_compare($app->system->getopensslversion(true), $nginx_openssl_ver, '>=')) {
16361635
if((version_compare($app->system->getnginxversion(true), '1.13.0', '>=') && version_compare($app->system->getopensslversion(true), '1.1.1', '>='))) {
16371636
$app->log('Enable TLS 1.3 for: '.$domain, LOGLEVEL_DEBUG);
16381637
$vhost_data['tls13_available'] = $app->system->getopensslversion(true);
16391638
}
16401639
}
1640+
16411641
$tpl->setVar($vhost_data);
16421642

16431643
$server_alias = array();

0 commit comments

Comments
 (0)