@@ -3238,16 +3238,15 @@ static int send_change_user_packet(MCPVIO_EXT *mpvio, const uchar *data,
3238
3238
return res;
3239
3239
}
3240
3240
3241
+ /* clang-format off */
3241
3242
/* *
3242
- @page page_protocol_conn_packets_protocol_ssl_request
3243
- Protocol::SSLRequest:
3243
+ @page page_protocol_connection_phase_packets_protocol_ssl_request Protocol::SSLRequest:
3244
3244
3245
3245
SSL Connection Request Packet. It is like
3246
- @ref page_protocol_conn_packets_protocol_handshake_response but is
3246
+ @ref page_protocol_connection_phase_packets_protocol_handshake_response but is
3247
3247
truncated right before username field. If server supports ::CLIENT_SSL
3248
3248
capability, client can send this packet to request a secure SSL connection.
3249
- The ::CLIENT_SSL capability flag must be set inside the SSL Connection Request
3250
- Packet.
3249
+ The ::CLIENT_SSL capability flag must be set inside the SSL Connection Request Packet.
3251
3250
3252
3251
<table>
3253
3252
<caption>Payload</caption>
@@ -3261,10 +3260,11 @@ static int send_change_user_packet(MCPVIO_EXT *mpvio, const uchar *data,
3261
3260
<td>maximum packet size</td></tr>
3262
3261
<tr><td>@ref a_protocol_type_int1 "int<1>"</td>
3263
3262
<td>character_set</td>
3264
- <td>client charset \ref a_protocol_character_set, only the lower
3265
- 8-bits</td></tr> <tr><td>@ref sect_protocol_basic_dt_string_fix
3266
- "string[23]"</td> <td>filler</td> <td>filler to the size of the handhshake
3267
- response packet. All 0s.</td></tr> <tr><td colspan="3">} else {</td></tr>
3263
+ <td>client charset \ref a_protocol_character_set, only the lower 8-bits</td></tr>
3264
+ <tr><td>@ref sect_protocol_basic_dt_string_fix "string[23]"</td>
3265
+ <td>filler</td>
3266
+ <td>filler to the size of the handhshake response packet. All 0s.</td></tr>
3267
+ <tr><td colspan="3">} else {</td></tr>
3268
3268
<tr><td>@ref a_protocol_type_int2 "int<2>"</td>
3269
3269
<td>client_flag</td>
3270
3270
<td>\ref group_cs_capabilities_flags, only the lower 16 bits</td></tr>
@@ -3276,6 +3276,7 @@ static int send_change_user_packet(MCPVIO_EXT *mpvio, const uchar *data,
3276
3276
3277
3277
@sa int2store(), int3store(), int4store(), mysql_fill_packet_header()
3278
3278
*/
3279
+ /* clang-format on */
3279
3280
/* *
3280
3281
Fill in the beginning of the client reply packet.
3281
3282
@@ -3483,20 +3484,18 @@ static int cli_establish_ssl(MYSQL *mysql) {
3483
3484
3484
3485
#define MAX_CONNECTION_ATTR_STORAGE_LENGTH 65536
3485
3486
3487
+ /* clang-format off */
3486
3488
/* *
3487
- @page page_protocol_conn_packets_protocol_handshake_response
3488
- Protocol::HandshakeResponse:
3489
+ @page page_protocol_connection_phase_packets_protocol_handshake_response Protocol::HandshakeResponse:
3489
3490
3490
3491
Depending on the servers support for the ::CLIENT_PROTOCOL_41 capability and
3491
3492
the clients understanding of that flag the client has to send either
3492
- a @ref sect_protocol_conn_packets_protocol_handshake_response320
3493
- or
3494
- @ref sect_protocol_conn_packets_protocol_handshake_response41.
3493
+ a @ref sect_protocol_connection_phase_packets_protocol_handshake_response320 or
3494
+ @ref sect_protocol_connection_phase_packets_protocol_handshake_response41.
3495
3495
3496
3496
@sa send_client_reply_packet
3497
3497
3498
- @section sect_protocol_conn_packets_protocol_handshake_response320
3499
- Protocol::HandshakeResponse320
3498
+ @section sect_protocol_connection_phase_packets_protocol_handshake_response320 Protocol::HandshakeResponse320
3500
3499
3501
3500
Old Handshake Response Packet used by old clients or if the server doesn't
3502
3501
support ::CLIENT_PROTOCOL_41 @ref group_cs_capabilities_flags flag.
@@ -3506,11 +3505,12 @@ static int cli_establish_ssl(MYSQL *mysql) {
3506
3505
<tr><th>Type</th><th>Name</th><th>Description</th></tr>
3507
3506
<tr><td>@ref a_protocol_type_int2 "int<2>"</td>
3508
3507
<td>client_flag</td>
3509
- <td>\ref group_cs_capabilities_flags, only the lower 16 bits.
3510
- ::CLIENT_PROTOCOL_41 should never be set</td></tr> <tr><td>@ref
3511
- a_protocol_type_int3 "int<3>"</td> <td>max_packet_size</td> <td>maximum
3512
- packet size, 0xFFFFFF max</td></tr> <tr><td>@ref
3513
- sect_protocol_basic_dt_string_null "string<NUL>"</td> <td>username</td>
3508
+ <td>\ref group_cs_capabilities_flags, only the lower 16 bits. ::CLIENT_PROTOCOL_41 should never be set</td></tr>
3509
+ <tr><td>@ref a_protocol_type_int3 "int<3>"</td>
3510
+ <td>max_packet_size</td>
3511
+ <td>maximum packet size, 0xFFFFFF max</td></tr>
3512
+ <tr><td>@ref sect_protocol_basic_dt_string_null "string<NUL>"</td>
3513
+ <td>username</td>
3514
3514
<td>login user name</td></tr>
3515
3515
<tr><td colspan="3">if capabilities @& ::CLIENT_CONNECT_WITH_DB {</td></tr>
3516
3516
<tr><td>@ref sect_protocol_basic_dt_string_null "string<NUL>"</td>
@@ -3541,15 +3541,14 @@ static int cli_establish_ssl(MYSQL *mysql) {
3541
3541
@note If auth-response is followed by a database field it must be
3542
3542
NULL terminated.
3543
3543
3544
- @section sect_protocol_conn_packets_protocol_handshake_response41
3545
- Protocol::HandshakeResponse41
3544
+ @section sect_protocol_connection_phase_packets_protocol_handshake_response41 Protocol::HandshakeResponse41
3546
3545
3547
3546
Handshake Response Packet sent by 4.1+ clients supporting
3548
3547
::CLIENT_PROTOCOL_41 @ref group_cs_capabilities_flags flag,
3549
3548
if the server announced it in its
3550
- @ref page_protocol_conn_packets_protocol_handshake .
3549
+ @ref page_protocol_connection_phase_packets_protocol_handshake .
3551
3550
Otherwise (talking to an old server) the
3552
- @ref sect_protocol_conn_packets_protocol_handshake_response320
3551
+ @ref sect_protocol_connection_phase_packets_protocol_handshake_response320
3553
3552
packet must be used.
3554
3553
3555
3554
@@ -3558,24 +3557,27 @@ static int cli_establish_ssl(MYSQL *mysql) {
3558
3557
<tr><th>Type</th><th>Name</th><th>Description</th></tr>
3559
3558
<tr><td>@ref a_protocol_type_int4 "int<4>"</td>
3560
3559
<td>client_flag</td>
3561
- <td>\ref group_cs_capabilities_flags, ::CLIENT_PROTOCOL_41 always
3562
- set.</td></tr> <tr><td>@ref a_protocol_type_int4 "int<4>"</td>
3560
+ <td>\ref group_cs_capabilities_flags, ::CLIENT_PROTOCOL_41 always set.</td></tr>
3561
+ <tr><td>@ref a_protocol_type_int4 "int<4>"</td>
3563
3562
<td>max_packet_size</td>
3564
3563
<td>maximum packet size</td></tr>
3565
3564
<tr><td>@ref a_protocol_type_int1 "int<1>"</td>
3566
3565
<td>character_set</td>
3567
- <td>client charset \ref a_protocol_character_set, only the lower
3568
- 8-bits</td></tr> <tr><td>@ref sect_protocol_basic_dt_string_fix
3569
- "string[23]"</td> <td>filler</td> <td>filler to the size of the handhshake
3570
- response packet. All 0s.</td></tr> <tr><td>@ref
3571
- sect_protocol_basic_dt_string_null "string<NUL>"</td> <td>username</td>
3566
+ <td>client charset \ref a_protocol_character_set, only the lower 8-bits</td></tr>
3567
+ <tr><td>@ref sect_protocol_basic_dt_string_fix "string[23]"</td>
3568
+ <td>filler</td>
3569
+ <td>filler to the size of the handhshake response packet. All 0s.</td></tr>
3570
+ <tr><td>@ref sect_protocol_basic_dt_string_null "string<NUL>"</td>
3571
+ <td>username</td>
3572
3572
<td>login user name</td></tr>
3573
- <tr><td colspan="3">if capabilities @& ::CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA
3574
- {</td></tr> <tr><td>@ref sect_protocol_basic_dt_string_le
3575
- "string<length>"</td> <td>auth_response</td> <td>opaque authentication
3576
- response data generated by Authentication Method indicated by the plugin name
3577
- field. </td></tr> <tr><td colspan="3">} else {</td></tr> <tr><td>@ref
3578
- a_protocol_type_int1 "int<1>"</td> <td>auth_response_length</td>
3573
+ <tr><td colspan="3">if capabilities @& ::CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA {</td></tr>
3574
+ <tr><td>@ref sect_protocol_basic_dt_string_le "string<length>"</td>
3575
+ <td>auth_response</td>
3576
+ <td>opaque authentication response data generated by
3577
+ Authentication Method indicated by the plugin name field. </td></tr>
3578
+ <tr><td colspan="3">} else {</td></tr>
3579
+ <tr><td>@ref a_protocol_type_int1 "int<1>"</td>
3580
+ <td>auth_response_length</td>
3579
3581
<td>length of auth_response</td></tr>
3580
3582
<tr><td>@ref sect_protocol_basic_dt_string_le "string<length>"</td>
3581
3583
<td>auth_response</td>
@@ -3605,16 +3607,15 @@ static int cli_establish_ssl(MYSQL *mysql) {
3605
3607
<tr><td>@ref sect_protocol_basic_dt_string_le "string<lenenc>"</td>
3606
3608
<td>value1</td>
3607
3609
<td>Value of the 1st client attribute</td></tr>
3608
- <tr><td colspan="3">.. (if more data in length of all key-values, more keys
3609
- and values parts)</td></tr> <tr><td colspan="3">}</td></tr>
3610
+ <tr><td colspan="3">.. (if more data in length of all key-values, more keys and values parts)</td></tr>
3611
+ <tr><td colspan="3">}</td></tr>
3610
3612
</table>
3611
3613
3612
3614
Example
3613
3615
========
3614
3616
3615
- On MySQL 5.5.8 with ::CLIENT_PROTOCOL_41 ::CLIENT_PLUGIN_AUTH,
3616
- CLIENT_SECURE_CONNECTION (removed in 8.0), and ::CLIENT_CONNECT_WITH_DB set,
3617
- it may look like:
3617
+ On MySQL 5.5.8 with ::CLIENT_PROTOCOL_41 ::CLIENT_PLUGIN_AUTH, CLIENT_SECURE_CONNECTION (removed in 8.0),
3618
+ and ::CLIENT_CONNECT_WITH_DB set, it may look like:
3618
3619
3619
3620
~~~~~~~~~~~~~~~~~~~~~
3620
3621
54 00 00 01 8d a6 0f 00 00 00 00 01 08 00 00 00 T...............
@@ -3648,11 +3649,12 @@ static int cli_establish_ssl(MYSQL *mysql) {
3648
3649
3649
3650
@note If client wants to have a secure SSL connection and sets
3650
3651
CLIENT_SSL flag it should first send the
3651
- @ref page_protocol_conn_packets_protocol_ssl_request packet
3652
+ @ref page_protocol_connection_phase_packets_protocol_ssl_request packet
3652
3653
and only then, after establishing the secure connection, it should send
3653
- the @ref page_protocol_conn_packets_protocol_handshake_response
3654
+ the @ref page_protocol_connection_phase_packets_protocol_handshake_response
3654
3655
packet.
3655
3656
*/
3657
+ /* clang-format on */
3656
3658
3657
3659
/* *
3658
3660
sends a client authentication packet (second packet in the 3-way handshake)
@@ -6179,24 +6181,22 @@ static int native_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) {
6179
6181
DBUG_RETURN (CR_OK);
6180
6182
}
6181
6183
6184
+ /* clang-format off */
6182
6185
/* *
6183
- @page page_protocol_conn_auth_methods_clear_text_password
6184
- Clear text client plugin
6186
+ @page page_protocol_connection_phase_authentication_methods_clear_text_password Clear text client plugin
6185
6187
6186
6188
<ul>
6187
6189
<li>
6188
6190
This client side plugin is used by a number of server plugins:
6189
- LDAP (*authentication_ldap_simple*) and PAM (*authentication_pam*) to name a
6190
- few.
6191
+ LDAP (*authentication_ldap_simple*) and PAM (*authentication_pam*) to name a few.
6191
6192
</li>
6192
6193
<li>
6193
6194
The client name is *mysql_clear_password*
6194
6195
</li>
6195
6196
<li>
6196
6197
Client side requires nothing from the server. But the server generates
6197
6198
and sends a 20-byte
6198
- @ref
6199
- page_protocol_conn_auth_methods_native_password_authentication
6199
+ @ref page_protocol_connection_phase_authentication_methods_native_password_authentication
6200
6200
compatible scramble.
6201
6201
</li>
6202
6202
<li>
@@ -6212,20 +6212,20 @@ static int native_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) {
6212
6212
@note
6213
6213
Sending the scramble is not necessary for the clear text
6214
6214
method, but, since the server always initiates the exchange by
6215
- sending @ref page_protocol_conn_packets_protocol_handshake
6215
+ sending @ref page_protocol_connection_phase_packets_protocol_handshake
6216
6216
and that one has a placeholder for authentication plugin dependent data the
6217
6217
server does fill that space with a scramble should it come to pass that
6218
6218
it will back down to
6219
- @ref
6220
- page_protocol_conn_auth_methods_native_password_authentication.
6219
+ @ref page_protocol_connection_phase_authentication_methods_native_password_authentication.
6221
6220
This is also why it's OK no to specifically read this in
6222
6221
@ref clear_password_auth_client since it's already read as a part of
6223
6222
the initial exchange.
6224
6223
6225
6224
6226
6225
@sa ::clear_password_auth_client, ::server_mpvio_write_packet,
6227
6226
::send_server_handshake_packet
6228
- */
6227
+ */
6228
+ /* clang-format on */
6229
6229
6230
6230
/* *
6231
6231
The main function of the mysql_clear_password authentication plugin.
0 commit comments