|
VMime
|
#include <SASLSession.hpp>


Public Member Functions | |
| ~SASLSession () | |
| void | init () |
| shared_ptr< authenticator > | getAuthenticator () |
| shared_ptr< SASLMechanism > | getMechanism () |
| shared_ptr< SASLContext > | getContext () |
| bool | evaluateChallenge (const byte_t *challenge, const size_t challengeLen, byte_t **response, size_t *responseLen) |
| shared_ptr< net::socket > | getSecuredSocket (shared_ptr< net::socket > sok) |
| const string | getServiceName () const |
Static Public Member Functions | |
| static shared_ptr< SASLSession > | create (const string &serviceName, shared_ptr< SASLContext > ctx, shared_ptr< authenticator > auth, shared_ptr< SASLMechanism > mech) |
Additional Inherited Members | |
| Protected Member Functions inherited from object | |
| object () | |
| object (const object &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
An SASL client session.
| ~SASLSession | ( | ) |
References ~SASLSession().
Referenced by ~SASLSession().
|
static |
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 |
References create().
Referenced by create(), SASLContext::createSession(), and SASLSocket.
| bool evaluateChallenge | ( | const byte_t * | challenge, |
| const size_t | challengeLen, | ||
| byte_t ** | response, | ||
| size_t * | 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.
If the challenge is empty (challengeLen == 0), the initial response is returned, if the mechanism has one.
| 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 occurred during authentication (in this case, the values in 'response' and 'responseLen' are undetermined) |
References evaluateChallenge().
Referenced by evaluateChallenge(), and SASLSocket.
| shared_ptr< authenticator > getAuthenticator | ( | ) |
Return the authenticator used for this session.
This is the authenticator which has been previously set with a call to setAuthenticator().
References getAuthenticator().
Referenced by getAuthenticator(), and SASLSocket.
| shared_ptr< SASLContext > getContext | ( | ) |
Return the SASL context.
References getContext().
Referenced by getContext(), and SASLSocket.
| shared_ptr< SASLMechanism > getMechanism | ( | ) |
Return the mechanism used for this session.
References getMechanism().
Referenced by getMechanism(), and SASLSocket.
| shared_ptr< net::socket > getSecuredSocket | ( | shared_ptr< 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 |
References getSecuredSocket().
Referenced by getSecuredSocket(), and SASLSocket.
| 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.
References getServiceName().
Referenced by getServiceName(), and SASLSocket.
| void init | ( | ) |
Initialize this SASL session.
This must be called before calling any other method on this object (except accessors).
References init().
Referenced by init(), and SASLSocket.