pop3: Added support for ;auth=<mech> in the URL

Added support for specifying the preferred authentication type and SASL
mechanism in the URL as per RFC-2384.
This commit is contained in:
Steve Holme 2013-04-13 16:09:28 +01:00
parent 00045a3009
commit b3a01be2f3
2 changed files with 97 additions and 8 deletions

View file

@ -74,6 +74,8 @@ struct pop3_conn {
non-body */
unsigned int authtypes; /* Supported authentication types */
unsigned int authmechs; /* Accepted SASL authentication mechanisms */
unsigned int preftype; /* Preferred authentication type */
unsigned int prefmech; /* Preferred SASL authentication mechanism */
unsigned int authused; /* SASL auth mechanism used for the connection */
char *apoptimestamp; /* APOP timestamp from the server greeting */
bool tls_supported; /* StartTLS capability supported by server */
@ -87,6 +89,10 @@ extern const struct Curl_handler Curl_handler_pop3s;
#define POP3_TYPE_APOP 0x0002
#define POP3_TYPE_SASL 0x0004
/* Authentication type values */
#define POP3_TYPE_NONE 0
#define POP3_TYPE_ANY ~0
/* This is the 5-bytes End-Of-Body marker for POP3 */
#define POP3_EOB "\x0d\x0a\x2e\x0d\x0a"
#define POP3_EOB_LEN 5