2018-02-07 12:13:58 +01:00
|
|
|
<?php
|
|
|
|
|
|
2024-09-17 17:56:12 +02:00
|
|
|
/**
|
|
|
|
|
* Connect to MySQL 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
|
|
|
|
|
{
|
2024-11-10 21:57:12 +01:00
|
|
|
private $ssl;
|
2024-09-17 17:56:12 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MySQL: ["key" => filename, "cert" => filename, "ca" => filename]
|
|
|
|
|
* PostgresSQL: ["mode" => sslmode] (https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLMODE)
|
2024-11-10 21:57:12 +01:00
|
|
|
* MSSQL: ["Encrypt" => true, "TrustServerCertificate" => true] (https://learn.microsoft.com/en-us/sql/connect/php/connection-options)
|
2024-09-17 17:56:12 +02:00
|
|
|
*/
|
|
|
|
|
function __construct(array $ssl)
|
|
|
|
|
{
|
2018-02-07 12:13:58 +01:00
|
|
|
$this->ssl = $ssl;
|
|
|
|
|
}
|
2024-09-17 17:56:12 +02:00
|
|
|
|
|
|
|
|
function connectSsl()
|
|
|
|
|
{
|
2018-02-07 12:13:58 +01:00
|
|
|
return $this->ssl;
|
|
|
|
|
}
|
|
|
|
|
}
|