1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 08:06:59 +02:00

Support connecting to MySQL via SSL

This commit is contained in:
Jakub Vrana
2018-02-07 12:13:58 +01:00
parent cac523402a
commit 42eec7d728
7 changed files with 64 additions and 4 deletions

24
plugins/login-ssl.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
/** 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 {
/** @access protected */
var $ssl;
/**
* @param array array("key" => filename, "cert" => filename, "ca" => filename)
*/
function __construct($ssl) {
$this->ssl = $ssl;
}
function connectSsl() {
return $this->ssl;
}
}

View File

@@ -97,6 +97,11 @@ class AdminerPlugin extends Adminer {
return $this->_applyPlugin(__FUNCTION__, $args);
}
function connectSsl() {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}
function permanentLogin($create = false) {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);