From 4f06e67ad2201390ed35a9ea6288a00c0b04782b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 20 Nov 2018 20:54:24 +0100 Subject: Re-commit MySQL 8 cached SHA auth support With changes to (hopefully) correctly fall back if OpenSSL support is missing. Furthermore the hard-coded dependency on ext/hash is no longer an issue, as this extension is required in master. This reverts commit 63072e9c0ebbb676cd39d0f867d873737c676add, reversing changes made to 4cbabb6852d2a7d966fb78a53d9d4c1cac18f10b. --- ext/mysqlnd/mysqlnd_connection.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/mysqlnd/mysqlnd_connection.c') diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index 826b47d717..8745cc4edc 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -666,9 +666,13 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn, { const MYSQLND_CSTRING scheme = { transport.s, transport.l }; + /* This will be overwritten below with a copy, but we can use it during authentication */ + conn->unix_socket.s = (char *)socket_or_pipe.s; if (FAIL == conn->m->connect_handshake(conn, &scheme, &username, &password, &database, mysql_flags)) { + conn->unix_socket.s = NULL; goto err; } + conn->unix_socket.s = NULL; } { -- cgit v1.2.1