Class DigestMD5.

Inherits SaslMechanism

Implements SASL DIGEST-MD5 authentication (RFC 2831)

The server sends a challenge containing various parameters which the client uses to compute a response. The server validates the response based on the stored secret, and responds with another challenge, to which the client must send an empty response.

We don't support a SASL initial response for this mechanism yet; nor do we support its use for anything but authentication.

DigestMD5::DigestMD5( EventHandler * c )

Creates a digest-md5 SASL authentication object on behalf of c

bool DigestMD5::parse( const EString & s, List< Variable > & l )

RFC 2831defines "n#m( expr )" as a list containing at least n, and at most m repetitions of expr, separated by commas, and optional linear white space:

( *LWS expr *( *LWS "," *LWS expr ) )

This function tries to parse s as #( name=["]value["] ), and adds each element to the list l. It returns true if the entire string could be parsed without error, and false otherwise.

If a name occurs more than once in the string, its value is appended to the instance already in l.

void DigestMD5::require( Variable * v, const EString & n )

This private helpers checks that v is present, is unique and quoted. If either breaks, it logs an appropriate debug message (naming v n) and sets the state to Failed.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.