2018-02-07 12:13:58 +01:00
|
|
|
<?php
|
|
|
|
|
|
2025-03-03 16:06:10 +01:00
|
|
|
/** Connect to MySQL, PostgreSQL or MS SQL using SSL
|
2018-02-07 12:13:58 +01:00
|
|
|
* @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)
|
|
|
|
|
*/
|
2025-04-07 16:32:57 +02:00
|
|
|
class AdminerLoginSsl extends Adminer\Plugin {
|
2025-03-11 07:21:13 +01:00
|
|
|
protected $ssl;
|
2024-09-17 17:56:12 +02:00
|
|
|
|
|
|
|
|
/**
|
2024-11-10 21:57:12 +01:00
|
|
|
* 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)
|
2018-02-07 12:13:58 +01:00
|
|
|
*/
|
2025-03-28 08:23:20 +01:00
|
|
|
function __construct(array $ssl) {
|
2018-02-07 12:13:58 +01:00
|
|
|
$this->ssl = $ssl;
|
|
|
|
|
}
|
2024-09-17 17:56:12 +02:00
|
|
|
|
2018-02-07 12:13:58 +01:00
|
|
|
function connectSsl() {
|
|
|
|
|
return $this->ssl;
|
|
|
|
|
}
|
2025-04-07 17:00:59 +02:00
|
|
|
|
2025-04-08 12:57:03 +02:00
|
|
|
protected $translations = array(
|
2025-04-07 17:00:59 +02:00
|
|
|
'cs' => array('' => 'Připojení k MySQL, PostgreSQL a MS SQL pomocí SSL'),
|
|
|
|
|
'de' => array('' => 'Stellen Sie eine Verbindung zu MySQL, PostgreSQL, MS SQL über SSL her'),
|
|
|
|
|
'pl' => array('' => 'Połącz się z MySQL, PostgreSQL, MS SQL za pomocą protokołu SSL'),
|
|
|
|
|
'ro' => array('' => 'Conectați-vă la MySQL, PostgreSQL, MS SQL utilizând SSL'),
|
|
|
|
|
);
|
2018-02-07 12:13:58 +01:00
|
|
|
}
|