Skip to content

Commit

Permalink
Fix SSL Provider: [error:1416F086:SSL routines:tls_process_server_cer…
Browse files Browse the repository at this point in the history
…tificate:certificate verify failed:self signed certificate
  • Loading branch information
Kabingeran committed Oct 6, 2023
1 parent 88647b9 commit 48c09b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions adminer/drivers/mssql.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ function connect($server, $username, $password) {
if ($db != "") {
$connection_info["Database"] = $db;
}
$ssl = $adminer->connectSsl();
$options = ['TrustServerCertificate', 'Encrypt'];
foreach ($options as $k) {
$connection_info[$k] = false;
if (isset($ssl[$k])) {
$connection_info[$k] = (bool)$ssl[$k];
}
}
$this->_link = @sqlsrv_connect(preg_replace('~:~', ',', $server), $connection_info);
if ($this->_link) {
$info = sqlsrv_server_info($this->_link);
Expand Down

0 comments on commit 48c09b7

Please sign in to comment.