mirror of
https://github.com/vrana/adminer.git
synced 2026-01-22 23:43:03 +01:00
https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/connection-string-syntax#use-trustservercertificate
28 lines
869 B
PHP
28 lines
869 B
PHP
<?php
|
|
|
|
/** Connect to MySQL or PostgreSQL using SSL
|
|
* @link https://www.adminer.org/plugins/#use
|
|
* @author Jakub Vrana, https://www.vrana.cz/
|
|
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
|
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
|
*/
|
|
class AdminerLoginSsl {
|
|
/** @access protected */
|
|
var $ssl;
|
|
|
|
/**
|
|
* @param array
|
|
* MySQL: ["key" => filename, "cert" => filename, "ca" => filename, "verify" => bool]
|
|
* PostgresSQL: ["mode" => sslmode] (https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLMODE)
|
|
* MSSQL: ["Encrypt" => true, "TrustServerCertificate" => true] (https://learn.microsoft.com/en-us/sql/connect/php/connection-options)
|
|
*/
|
|
function __construct($ssl) {
|
|
$this->ssl = $ssl;
|
|
}
|
|
|
|
function connectSsl() {
|
|
return $this->ssl;
|
|
}
|
|
|
|
}
|