Skip to content

Commit 3e4074b

Browse files
committed
Unbreak the doxygen by reverting to the state before the
auto-reformat and adding comments to turn auth-reformat off for the doxygen pages
1 parent 25c686e commit 3e4074b

File tree

9 files changed

+470
-560
lines changed

9 files changed

+470
-560
lines changed

Doxyfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,6 @@ INPUT = ./client \
879879
./plugin/test_service_sql_api \
880880
./plugin/version_token \
881881
./plugin/pfs_table_plugin \
882-
./rapid \
883882
./sql \
884883
./sql-common \
885884
./storage \

libmysql/authentication_win/handshake_client.cc

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,9 @@ Blob Handshake_client::process_data(const Blob &data) {
286286

287287
/**********************************************************************/
288288

289+
/* clang-format off */
289290
/**
290-
@page page_protocol_conn_auth_methods_auth_windows
291-
Windows Native Authentication
291+
@page page_protocol_connection_phase_authentication_methods_authentication_windows Windows Native Authentication
292292
293293
Authentication::WindowsAuth:
294294
@@ -306,19 +306,16 @@ Blob Handshake_client::process_data(const Blob &data) {
306306
and back than the old handshake permitted.
307307
308308
Basically it wraps the output of the
309-
[Negotiate
310-
SSP]("http://msdn.microsoft.com/en-us/library/windows/desktop/aa378748(v=VS.85).aspx")
309+
[Negotiate SSP]("http://msdn.microsoft.com/en-us/library/windows/desktop/aa378748(v=VS.85).aspx")
311310
in the Auth Phase protocol which either means
312-
@ref sect_protocol_conn_auth_methods_auth_windows_ntlm
313-
or
314-
@ref sect_protocol_conn_auth_methods_auth_windows_spnego
311+
@ref sect_protocol_connection_phase_authentication_methods_authentication_windows_ntlm or
312+
@ref sect_protocol_connection_phase_authentication_methods_authentication_windows_spnego
315313
are used as underlying protocol.
316314
317315
Due to the implementation details the Windows Native Authentication method
318-
doesn't use the fast path of the @ref page_protocol_conn, but is
316+
doesn't use the fast path of the @ref page_protocol_connection_phase, but is
319317
only triggered on request as part of the
320-
@ref page_protocol_conn_packets_protocol_auth_switch_request
321-
packet.
318+
@ref page_protocol_connection_phase_packets_protocol_auth_switch_request packet.
322319
323320
324321
@note Due to implementation details (again) the first packet sent from the
@@ -329,16 +326,15 @@ Blob Handshake_client::process_data(const Blob &data) {
329326
Also following windows authentication packets don't get split.
330327
331328
The client will send either a
332-
@ref sect_protocol_conn_auth_methods_auth_windows_spnego
333-
or a @ref sect_protocol_conn_auth_methods_auth_windows_ntlm
329+
@ref sect_protocol_connection_phase_authentication_methods_authentication_windows_spnego
330+
or a @ref sect_protocol_connection_phase_authentication_methods_authentication_windows_ntlm
334331
packet as a next packet.
335332
336333
To implement the protocol one can use several existing implementations:
337334
<ul>
338335
<li>MS Windows provides
339336
[InitializeSecurityContextW](http://msdn.microsoft.com/en-us/library/windows/desktop/aa375509(v=VS.85).aspx)
340-
and
341-
[AcceptSecurityContext](http://msdn.microsoft.com/en-us/library/aa374703.aspx)
337+
and [AcceptSecurityContext](http://msdn.microsoft.com/en-us/library/aa374703.aspx)
342338
</li>
343339
<li>A open source implemenation of NTML, SPNEGO and Kerberos5 are provided by
344340
[Heimdal](http://www.h5l.org/)
@@ -351,14 +347,11 @@ Blob Handshake_client::process_data(const Blob &data) {
351347
@sa win_auth_handshake_client
352348
353349
354-
@section sect_protocol_conn_auth_methods_auth_windows_ntlm
355-
NTLM
350+
@section sect_protocol_connection_phase_authentication_methods_authentication_windows_ntlm NTLM
356351
357-
@note [Removed in Windows Vista and
358-
2008](http://msdn.microsoft.com/en-us/library/aa480152.aspx#appcomp_topic16)
352+
@note [Removed in Windows Vista and 2008](http://msdn.microsoft.com/en-us/library/aa480152.aspx#appcomp_topic16)
359353
360-
@note Documented in
361-
[MSDN](https://msdn.microsoft.com/en-us/library/cc207842.aspx)
354+
@note Documented in [MSDN](https://msdn.microsoft.com/en-us/library/cc207842.aspx)
362355
363356
@startuml
364357
Client->Server: NTLM request
@@ -369,8 +362,7 @@ Blob Handshake_client::process_data(const Blob &data) {
369362
@enduml
370363
371364
372-
@section sect_protocol_conn_auth_methods_auth_windows_spnego
373-
SPNEGO
365+
@section sect_protocol_connection_phase_authentication_methods_authentication_windows_spnego SPNEGO
374366
375367
Uses GSS-API as protocol and negotiates the proper auth-method automatically.
376368
@par Tip
@@ -401,6 +393,7 @@ Blob Handshake_client::process_data(const Blob &data) {
401393
@enduml
402394
403395
*/
396+
/* clang-format on */
404397

405398
/**
406399
Perform authentication handshake from client side.

sql-common/client.cc

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3238,16 +3238,15 @@ static int send_change_user_packet(MCPVIO_EXT *mpvio, const uchar *data,
32383238
return res;
32393239
}
32403240

3241+
/* clang-format off */
32413242
/**
3242-
@page page_protocol_conn_packets_protocol_ssl_request
3243-
Protocol::SSLRequest:
3243+
@page page_protocol_connection_phase_packets_protocol_ssl_request Protocol::SSLRequest:
32443244
32453245
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
32473247
truncated right before username field. If server supports ::CLIENT_SSL
32483248
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.
32513250
32523251
<table>
32533252
<caption>Payload</caption>
@@ -3261,10 +3260,11 @@ static int send_change_user_packet(MCPVIO_EXT *mpvio, const uchar *data,
32613260
<td>maximum packet size</td></tr>
32623261
<tr><td>@ref a_protocol_type_int1 "int&lt;1&gt;"</td>
32633262
<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>
32683268
<tr><td>@ref a_protocol_type_int2 "int&lt;2&gt;"</td>
32693269
<td>client_flag</td>
32703270
<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,
32763276
32773277
@sa int2store(), int3store(), int4store(), mysql_fill_packet_header()
32783278
*/
3279+
/* clang-format on */
32793280
/**
32803281
Fill in the beginning of the client reply packet.
32813282
@@ -3483,20 +3484,18 @@ static int cli_establish_ssl(MYSQL *mysql) {
34833484

34843485
#define MAX_CONNECTION_ATTR_STORAGE_LENGTH 65536
34853486

3487+
/* clang-format off */
34863488
/**
3487-
@page page_protocol_conn_packets_protocol_handshake_response
3488-
Protocol::HandshakeResponse:
3489+
@page page_protocol_connection_phase_packets_protocol_handshake_response Protocol::HandshakeResponse:
34893490
34903491
Depending on the servers support for the ::CLIENT_PROTOCOL_41 capability and
34913492
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.
34953495
34963496
@sa send_client_reply_packet
34973497
3498-
@section sect_protocol_conn_packets_protocol_handshake_response320
3499-
Protocol::HandshakeResponse320
3498+
@section sect_protocol_connection_phase_packets_protocol_handshake_response320 Protocol::HandshakeResponse320
35003499
35013500
Old Handshake Response Packet used by old clients or if the server doesn't
35023501
support ::CLIENT_PROTOCOL_41 @ref group_cs_capabilities_flags flag.
@@ -3506,11 +3505,12 @@ static int cli_establish_ssl(MYSQL *mysql) {
35063505
<tr><th>Type</th><th>Name</th><th>Description</th></tr>
35073506
<tr><td>@ref a_protocol_type_int2 "int&lt;2&gt;"</td>
35083507
<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&lt;3&gt;"</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&lt;NUL&gt;"</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&lt;3&gt;"</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&lt;NUL&gt;"</td>
3513+
<td>username</td>
35143514
<td>login user name</td></tr>
35153515
<tr><td colspan="3">if capabilities @& ::CLIENT_CONNECT_WITH_DB {</td></tr>
35163516
<tr><td>@ref sect_protocol_basic_dt_string_null "string&lt;NUL&gt;"</td>
@@ -3541,15 +3541,14 @@ static int cli_establish_ssl(MYSQL *mysql) {
35413541
@note If auth-response is followed by a database field it must be
35423542
NULL terminated.
35433543
3544-
@section sect_protocol_conn_packets_protocol_handshake_response41
3545-
Protocol::HandshakeResponse41
3544+
@section sect_protocol_connection_phase_packets_protocol_handshake_response41 Protocol::HandshakeResponse41
35463545
35473546
Handshake Response Packet sent by 4.1+ clients supporting
35483547
::CLIENT_PROTOCOL_41 @ref group_cs_capabilities_flags flag,
35493548
if the server announced it in its
3550-
@ref page_protocol_conn_packets_protocol_handshake.
3549+
@ref page_protocol_connection_phase_packets_protocol_handshake.
35513550
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
35533552
packet must be used.
35543553
35553554
@@ -3558,24 +3557,27 @@ static int cli_establish_ssl(MYSQL *mysql) {
35583557
<tr><th>Type</th><th>Name</th><th>Description</th></tr>
35593558
<tr><td>@ref a_protocol_type_int4 "int&lt;4&gt;"</td>
35603559
<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&lt;4&gt;"</td>
3560+
<td>\ref group_cs_capabilities_flags, ::CLIENT_PROTOCOL_41 always set.</td></tr>
3561+
<tr><td>@ref a_protocol_type_int4 "int&lt;4&gt;"</td>
35633562
<td>max_packet_size</td>
35643563
<td>maximum packet size</td></tr>
35653564
<tr><td>@ref a_protocol_type_int1 "int&lt;1&gt;"</td>
35663565
<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&lt;NUL&gt;"</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&lt;NUL&gt;"</td>
3571+
<td>username</td>
35723572
<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&lt;length&gt;"</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&lt;1&gt;"</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&lt;length&gt;"</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&lt;1&gt;"</td>
3580+
<td>auth_response_length</td>
35793581
<td>length of auth_response</td></tr>
35803582
<tr><td>@ref sect_protocol_basic_dt_string_le "string&lt;length&gt;"</td>
35813583
<td>auth_response</td>
@@ -3605,16 +3607,15 @@ static int cli_establish_ssl(MYSQL *mysql) {
36053607
<tr><td>@ref sect_protocol_basic_dt_string_le "string&lt;lenenc&gt;"</td>
36063608
<td>value1</td>
36073609
<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>
36103612
</table>
36113613
36123614
Example
36133615
========
36143616
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:
36183619
36193620
~~~~~~~~~~~~~~~~~~~~~
36203621
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) {
36483649
36493650
@note If client wants to have a secure SSL connection and sets
36503651
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
36523653
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
36543655
packet.
36553656
*/
3657+
/* clang-format on */
36563658

36573659
/**
36583660
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) {
61796181
DBUG_RETURN(CR_OK);
61806182
}
61816183

6184+
/* clang-format off */
61826185
/**
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
61856187
61866188
<ul>
61876189
<li>
61886190
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.
61916192
</li>
61926193
<li>
61936194
The client name is *mysql_clear_password*
61946195
</li>
61956196
<li>
61966197
Client side requires nothing from the server. But the server generates
61976198
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
62006200
compatible scramble.
62016201
</li>
62026202
<li>
@@ -6212,20 +6212,20 @@ static int native_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) {
62126212
@note
62136213
Sending the scramble is not necessary for the clear text
62146214
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
62166216
and that one has a placeholder for authentication plugin dependent data the
62176217
server does fill that space with a scramble should it come to pass that
62186218
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.
62216220
This is also why it's OK no to specifically read this in
62226221
@ref clear_password_auth_client since it's already read as a part of
62236222
the initial exchange.
62246223
62256224
62266225
@sa ::clear_password_auth_client, ::server_mpvio_write_packet,
62276226
::send_server_handshake_packet
6228-
*/
6227+
*/
6228+
/* clang-format on */
62296229

62306230
/**
62316231
The main function of the mysql_clear_password authentication plugin.

0 commit comments

Comments
 (0)