summaryrefslogtreecommitdiff
path: root/lib/pop3.h
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2012-05-27 19:09:38 +0100
committerSteve Holme <steve_holme@hotmail.com>2012-05-27 19:09:38 +0100
commitc267c53017bc37d34be23f885f34776659a13c43 (patch)
tree3d6b17c3416814c80eeb6cffefe15fb3a0393d9f /lib/pop3.h
parentdc454bd16b546871b9910ec4d4b0ade899c43e56 (diff)
downloadcurl-c267c53017bc37d34be23f885f34776659a13c43.tar.gz
pop3: Added support for SASL based authentication mechanism detection
Added support for detecting the supported SASL authentication mechanisms via the AUTH command. There are two ways of detecting them, either by using the AUTH command, that will return -ERR if not supported or by using the CAPA command which will return SASL and the list of mechanisms if supported, not include SASL if SASL authentication is not supported or -ERR if the CAPA command is not supported. As such it seems simpler to use the AUTH command and fallback to normal clear text authentication if the the command is not supported. Additionally updated the test cases to return -ERR when the AUTH command is encountered. Additional test cases will be added when support for the individual authentication mechanisms is added.
Diffstat (limited to 'lib/pop3.h')
-rw-r--r--lib/pop3.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pop3.h b/lib/pop3.h
index 99b514e4c..01701e4d7 100644
--- a/lib/pop3.h
+++ b/lib/pop3.h
@@ -29,6 +29,7 @@ typedef enum {
POP3_STOP, /* do nothing state, stops the state machine */
POP3_SERVERGREET, /* waiting for the initial greeting immediately after
a connect */
+ POP3_AUTH,
POP3_USER,
POP3_PASS,
POP3_STARTTLS,
@@ -46,6 +47,7 @@ struct pop3_conn {
size_t eob; /* number of bytes of the EOB (End Of Body) that has been
received thus far */
size_t strip; /* number of bytes from the start to ignore as non-body */
+ unsigned int authmechs; /* Accepted authentication methods */
pop3state state; /* always use pop3.c:state() to change state! */
};