Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mysqli ssl without server certificate #483

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zeleznypa
Copy link

When I need to connect to Mysql server via SSL but I don't have a server certificate, there is a possibility to setup the connection like the following:

function adminer_object()
{
    // autoloader
    foreach (glob(__DIR__ . '/plugins/*.php') as $filename) {
        require_once $filename;
    }

    $plugins = [
        new AdminerLoginSsl(['key' => '', 'cert' => '', 'ca' => '']),
    ];

    return new AdminerPlugin($plugins);
}

require __DIR__ . '/adminer.php';

But unfortunately, it doesn't work with the MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT directive. It fails on the error: Connections using insecure transport are prohibited while --require_secure_transport=ON.

But with the MYSQLI_CLIENT_SSL it works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant