MySQL 5.6.14 Source Code Document
|
Client-side context for authentication handshake. More...
Public Member Functions | |
Handshake_client (Connection &con, const char *target, size_t len) | |
Blob | first_packet () |
Blob | process_data (const Blob &) |
Blob | read_packet () |
Read packet from the other end. | |
int | write_packet (Blob &data) |
Write packet to the other end. | |
Public Member Functions inherited from Handshake | |
Handshake (const char *ssp, side_t side) | |
int | packet_processing_loop () |
virtual bool | is_complete () const |
int | error () const |
const char * | ssp_name () |
Additional Inherited Members | |
Public Types inherited from Handshake | |
enum | side_t { CLIENT, SERVER } |
Protected Member Functions inherited from Handshake | |
bool | process_result (int) |
Protected Attributes inherited from Handshake | |
CtxtHandle | m_sctx |
Security context object created during the handshake. | |
CredHandle | m_cred |
Credentials of the principal performing this handshake. | |
TimeStamp | m_expire |
Stores expiry date of the created security context. | |
ULONG | m_atts |
Stores attributes of the created security context. | |
unsigned int | m_round |
int | m_error |
If non-zero, stores error code of the last failed operation. | |
bool | m_complete |
true when handshake is complete. | |
bool | m_have_credentials |
true when the principal credentials has been determined. | |
bool | m_have_sec_context |
true when the security context has been created. | |
Security_buffer | m_output |
Buffer for data to be send to the other side. |
Client-side context for authentication handshake.
Definition at line 23 of file handshake_client.cc.
Handshake_client::Handshake_client | ( | Connection & | con, |
const char * | target, | ||
size_t | len | ||
) |
Create authentication handshake context for client.
con | connection for communication with the peer |
target | name of the target service with which we will authenticate (can be NULL if not used) |
Some security packages (like Kerberos) require providing explicit name of the service with which a client wants to authenticate. The server-side authentication plugin sends this name in the greeting packet (see win_auth_handshake_{server
,client}() functions).
Definition at line 64 of file handshake_client.cc.
Process data sent by server.
[in] | data | blob with data from server |
This method analyses data sent by server during authentication handshake. If client should continue packet exchange, this method returns data to be sent to the server next. If no more data needs to be exchanged, an empty blob is returned and is_complete()
is true
. In case of error an empty blob is returned and error()
gives non-zero error code.
When invoked for the first time (in the first round of the handshake) there is no data from the server (data blob is null) and the intial packet is generated without an input.
Implements Handshake.
Definition at line 226 of file handshake_client.cc.