An SASL client session. More...


Public Member Functions | |
| ~SASLSession () | |
| SASLSession (const string &serviceName, ref< SASLContext > ctx, ref< authenticator > auth, ref< SASLMechanism > mech) | |
| void | init () |
| ref< authenticator > | getAuthenticator () |
| ref< SASLMechanism > | getMechanism () |
| ref< SASLContext > | getContext () |
| bool | evaluateChallenge (const byte_t *challenge, const int challengeLen, byte_t **response, int *responseLen) |
| ref< net::socket > | getSecuredSocket (ref< net::socket > sok) |
| const string | getServiceName () const |
An SASL client session.
| ~SASLSession | ( | ) |
| SASLSession | ( | const string & | serviceName, | |
| ref< SASLContext > | ctx, | |||
| ref< authenticator > | auth, | |||
| ref< SASLMechanism > | mech | |||
| ) |
Construct a new SASL session.
| serviceName | name of the service using this session | |
| ctx | SASL context | |
| auth | authenticator to use for this session | |
| mech | SASL mechanism |
| bool evaluateChallenge | ( | const byte_t * | challenge, | |
| const int | challengeLen, | |||
| byte_t ** | response, | |||
| int * | responseLen | |||
| ) |
Perform one step of SASL authentication.
Accept data from the server (challenge), process it and return data to be returned in response to the server.
| challenge | challenge sent from the server | |
| challengeLen | length of challenge | |
| response | response to send to the server (allocated by this function, free with delete[]) | |
| responseLen | length of response buffer |
| exceptions::sasl_exception | if an error occured during authentication (in this case, the values in 'response' and 'responseLen' are undetermined) |
| ref< authenticator > getAuthenticator | ( | ) |
Return the authenticator used for this session.
This is the authenticator which has been previously set with a call to setAuthenticator().
| ref< SASLContext > getContext | ( | ) |
Return the SASL context.
| ref< SASLMechanism > getMechanism | ( | ) |
Return the mechanism used for this session.
| ref< net::socket > getSecuredSocket | ( | ref< net::socket > | sok | ) |
Return a socket in which transmitted data is integrity and/or privacy protected, depending on the QOP (Quality of Protection) negotiated during the SASL authentication.
| sok | socket to wrap |
| const string getServiceName | ( | ) | const |
Return the name of the service which is using this SASL session (eg.
"imap"). This value should be returned by the authenticator when INFO_SERVICE is requested.
| void init | ( | ) |
Initialize this SASL session.
This must be called before calling any other method on this object (except accessors).
1.6.2