pop3: Added support for SASL based authentication mechanism detection
authorSteve Holme <steve_holme@hotmail.com>
Sun, 27 May 2012 18:09:38 +0000 (19:09 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 27 May 2012 18:09:38 +0000 (19:09 +0100)
commitc267c53017bc37d34be23f885f34776659a13c43
tree3d6b17c3416814c80eeb6cffefe15fb3a0393d9f
parentdc454bd16b546871b9910ec4d4b0ade899c43e56
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.
lib/pop3.c
lib/pop3.h
tests/data/test808
tests/data/test809
tests/data/test810
tests/data/test811
tests/data/test812
tests/data/test813
tests/data/test815