From c267c53017bc37d34be23f885f34776659a13c43 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sun, 27 May 2012 19:09:38 +0100 Subject: 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. --- tests/data/test811 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/data/test811') diff --git a/tests/data/test811 b/tests/data/test811 index ca107abcc..06fa57dcb 100644 --- a/tests/data/test811 +++ b/tests/data/test811 @@ -10,6 +10,7 @@ LIST # Server-side +REPLY AUTH -ERR unsupported command REPLY LIST +OK but no messages\r\n. @@ -34,6 +35,7 @@ pop3://%HOSTIP:%POP3PORT/ -u user:secret # Verify data after the test has been "shot" +AUTH USER user PASS secret LIST -- cgit v1.2.3