VMime
|
Public Member Functions | |
builtinSASLMechanism (shared_ptr< SASLContext > ctx, const string &name) | |
~builtinSASLMechanism () | |
const string | getName () const |
bool | step (shared_ptr< SASLSession > sess, const byte_t *challenge, const size_t challengeLen, byte_t **response, size_t *responseLen) |
bool | isComplete () const |
bool | hasInitialResponse () const |
void | encode (shared_ptr< SASLSession > sess, const byte_t *input, const size_t inputLen, byte_t **output, size_t *outputLen) |
void | decode (shared_ptr< SASLSession > sess, const byte_t *input, const size_t inputLen, byte_t **output, size_t *outputLen) |
Additional Inherited Members | |
![]() | |
object () | |
object (const object &) | |
object & | operator= (const object &) |
virtual | ~object () |
A built-in authentication mechanism that relies on the GNU SASL library.
builtinSASLMechanism | ( | shared_ptr< SASLContext > | ctx, |
const string & | name | ||
) |
~builtinSASLMechanism | ( | ) |
|
virtual |
Decode data according to negotiated SASL mechanism.
This might mean that data is integrity or privacy protected.
sess | SASL session |
input | input buffer |
inputLen | length of input buffer |
output | output buffer (allocated bu the function, free with delete[]) |
outputLen | length of output buffer |
exceptions::sasl_exception | if an error occured during the encoding of data (in this case, the values in 'output' and 'outputLen' are undetermined) |
Implements SASLMechanism.
|
virtual |
Encode data according to negotiated SASL mechanism.
This might mean that data is integrity or privacy protected.
sess | SASL session |
input | input buffer |
inputLen | length of input buffer |
output | output buffer (allocated bu the function, free with delete[]) |
outputLen | length of output buffer |
exceptions::sasl_exception | if an error occured during the encoding of data (in this case, the values in 'output' and 'outputLen' are undetermined) |
Implements SASLMechanism.
|
virtual |
|
virtual |
Determine if this mechanism has an optional initial response.
If true, caller should call step() with an empty challenge to get the initial response.
Implements SASLMechanism.
|
virtual |
Check whether authentication has completed.
If false, more calls to evaluateChallenge() are needed to complete the authentication process).
Implements SASLMechanism.
|
virtual |
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 this mechanism has one.
sess | SASL session |
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) |
Implements SASLMechanism.