From ed3a5d773423f2da94c57e5c2aa4dae1ae0dc5a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Thu, 22 Feb 2024 11:20:36 +0100 Subject: [PATCH] Add doc for 'switching_auth_type' in SHA2 full --- lib/MySQL_Protocol.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/MySQL_Protocol.cpp b/lib/MySQL_Protocol.cpp index 7cca30427..6691f9d3f 100644 --- a/lib/MySQL_Protocol.cpp +++ b/lib/MySQL_Protocol.cpp @@ -2204,6 +2204,11 @@ void MySQL_Protocol::PPHR_sha2full( if ((*myds)->switching_auth_stage == 0) { const unsigned char perform_full_authentication = '\4'; generate_one_byte_pkt(perform_full_authentication); + // Required to be set; later used in 'PPHR_1' for setting current 'auth_plugin_id'. E.g: + // - mysql-default_authentication_plugin: 'caching_sha2_password' + // - Requested authentication: 'caching_sha2_password' + // - Stored password: 'mysql_native_password' + // A full auth is required; and the switching auth type will be used later in 'PPHR_1'. (*myds)->switching_auth_type = auth_plugin_id; (*myds)->switching_auth_stage = 4; (*myds)->auth_in_progress = 1;