From ed9a4b9fc46f967da9e6a355f860f2a43505f41b Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 27 Jan 2015 18:03:56 +0100 Subject: test: add test cases for sasl external authentication (imap/pop3/smtp). --- tests/data/Makefile.inc | 3 ++- tests/data/test942 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test943 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test944 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test945 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test946 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test947 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test948 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test949 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test950 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test951 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test952 | 55 +++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test953 | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 674 insertions(+), 1 deletion(-) create mode 100644 tests/data/test942 create mode 100644 tests/data/test943 create mode 100644 tests/data/test944 create mode 100644 tests/data/test945 create mode 100644 tests/data/test946 create mode 100644 tests/data/test947 create mode 100644 tests/data/test948 create mode 100644 tests/data/test949 create mode 100644 tests/data/test950 create mode 100644 tests/data/test951 create mode 100644 tests/data/test952 create mode 100644 tests/data/test953 (limited to 'tests') diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 6467ca0bb..3101da69f 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -97,7 +97,8 @@ test900 test901 test902 test903 test904 test905 test906 test907 test908 \ test909 test910 test911 test912 test913 test914 test915 test916 test917 \ test918 test919 test920 test921 test922 test923 test924 test925 test926 \ test927 test928 test929 test930 test931 test932 test933 test934 test935 \ -test936 test937 test938 test939 test940 test941 \ +test936 test937 test938 test939 test940 test941 test942 test943 test944 \ +test945 test946 test947 test948 test949 test950 test951 test952 test953 \ \ test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 \ test1008 test1009 test1010 test1011 test1012 test1013 test1014 test1015 \ diff --git a/tests/data/test942 b/tests/data/test942 new file mode 100644 index 000000000..fb4cfbfb3 --- /dev/null +++ b/tests/data/test942 @@ -0,0 +1,56 @@ + + + +IMAP +SASL +SASL AUTH EXTERNAL +RFC4422 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTHENTICATE + +REPLY dXNlcg== A002 OK AUTHENTICATE completed + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# +# Client-side + + +imap + + +IMAP external authentication + + +'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/942/;UID=1' + + + +# +# Verify data after the test has been "shot" + + +A001 CAPABILITY +A002 AUTHENTICATE EXTERNAL +dXNlcg== +A003 SELECT 942 +A004 FETCH 1 BODY[] +A005 LOGOUT + + + diff --git a/tests/data/test943 b/tests/data/test943 new file mode 100644 index 000000000..833a92b83 --- /dev/null +++ b/tests/data/test943 @@ -0,0 +1,56 @@ + + + +IMAP +SASL +SASL AUTH EXTERNAL +RFC4422 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTHENTICATE + +REPLY = A002 OK AUTHENTICATE completed + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# +# Client-side + + +imap + + +IMAP external authentication without credentials + + +'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/943/;UID=1' + + + +# +# Verify data after the test has been "shot" + + +A001 CAPABILITY +A002 AUTHENTICATE EXTERNAL += +A003 SELECT 943 +A004 FETCH 1 BODY[] +A005 LOGOUT + + + diff --git a/tests/data/test944 b/tests/data/test944 new file mode 100644 index 000000000..3328953c2 --- /dev/null +++ b/tests/data/test944 @@ -0,0 +1,56 @@ + + + +IMAP +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC4422 + + + +# +# Server-side + + +AUTH EXTERNAL +CAPA SASL-IR +REPLY AUTHENTICATE A002 OK AUTHENTICATE completed + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# +# Client-side + + +imap + + +IMAP external authentication with initial response + + +'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/944/;UID=1' + + + +# +# Verify data after the test has been "shot" + + +A001 CAPABILITY +A002 AUTHENTICATE EXTERNAL dXNlcg== +A003 SELECT 944 +A004 FETCH 1 BODY[] +A005 LOGOUT + + + diff --git a/tests/data/test945 b/tests/data/test945 new file mode 100644 index 000000000..158b3579a --- /dev/null +++ b/tests/data/test945 @@ -0,0 +1,56 @@ + + + +IMAP +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC4422 + + + +# +# Server-side + + +AUTH EXTERNAL +CAPA SASL-IR +REPLY AUTHENTICATE A002 OK AUTHENTICATE completed + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# +# Client-side + + +imap + + +IMAP external authentication with initial response without credentials + + +'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/945/;UID=1' + + + +# +# Verify data after the test has been "shot" + + +A001 CAPABILITY +A002 AUTHENTICATE EXTERNAL = +A003 SELECT 945 +A004 FETCH 1 BODY[] +A005 LOGOUT + + + diff --git a/tests/data/test946 b/tests/data/test946 new file mode 100644 index 000000000..46f7b10b3 --- /dev/null +++ b/tests/data/test946 @@ -0,0 +1,57 @@ + + + +POP3 +SASL +SASL AUTH EXTERNAL +RFC1734 +RFC4422 +RFC5034 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTH + +REPLY dXNlcg== +OK Login successful + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# +# Client-side + + +pop3 + + +POP3 external authentication + + +'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/946' + + + +# +# Verify data after the test has been "shot" + + +CAPA +AUTH EXTERNAL +dXNlcg== +RETR 946 +QUIT + + + diff --git a/tests/data/test947 b/tests/data/test947 new file mode 100644 index 000000000..df1474ea2 --- /dev/null +++ b/tests/data/test947 @@ -0,0 +1,57 @@ + + + +POP3 +SASL +SASL AUTH EXTERNAL +RFC1734 +RFC4422 +RFC5034 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTH + +REPLY = +OK Login successful + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# +# Client-side + + +pop3 + + +POP3 external authentication without credentials + + +'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/947' + + + +# +# Verify data after the test has been "shot" + + +CAPA +AUTH EXTERNAL += +RETR 947 +QUIT + + + diff --git a/tests/data/test948 b/tests/data/test948 new file mode 100644 index 000000000..4ed21cb1f --- /dev/null +++ b/tests/data/test948 @@ -0,0 +1,56 @@ + + + +POP3 +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC1734 +RFC4422 +RFC5034 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTH +OK Login successful + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# +# Client-side + + +pop3 + + +POP3 external authentication with initial response + + +'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/948' --sasl-ir + + + +# +# Verify data after the test has been "shot" + + +CAPA +AUTH EXTERNAL dXNlcg== +RETR 948 +QUIT + + + diff --git a/tests/data/test949 b/tests/data/test949 new file mode 100644 index 000000000..93f7f97f4 --- /dev/null +++ b/tests/data/test949 @@ -0,0 +1,56 @@ + + + +POP3 +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC1734 +RFC4422 +RFC5034 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTH +OK Login successful + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + +# +# Client-side + + +pop3 + + +POP3 external authentication with initial response without credentials + + +'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/949' --sasl-ir + + + +# +# Verify data after the test has been "shot" + + +CAPA +AUTH EXTERNAL = +RETR 949 +QUIT + + + diff --git a/tests/data/test950 b/tests/data/test950 new file mode 100644 index 000000000..b4dab8ae8 --- /dev/null +++ b/tests/data/test950 @@ -0,0 +1,56 @@ + + + +SMTP +SASL +SASL AUTH EXTERNAL +RFC4422 +RFC4954 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTH 334 EXTERNAL supported +REPLY dXNlcg== 235 Authenticated + + + +# +# Client-side + + +smtp + + +SMTP external authentication + + +mail body + + +'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/950' --mail-rcpt recipient@example.com --mail-from sender@example.com -T - + + + +# +# Verify data after the test has been "shot" + + +EHLO 950 +AUTH EXTERNAL +dXNlcg== +MAIL FROM: +RCPT TO: +DATA +QUIT + + +mail body +. + + + diff --git a/tests/data/test951 b/tests/data/test951 new file mode 100644 index 000000000..1dd21a679 --- /dev/null +++ b/tests/data/test951 @@ -0,0 +1,56 @@ + + + +SMTP +SASL +SASL AUTH EXTERNAL +RFC4422 +RFC4954 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTH 334 EXTERNAL supported +REPLY = 235 Authenticated + + + +# +# Client-side + + +smtp + + +SMTP external authentication without credentials + + +mail body + + +'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/951' --mail-rcpt recipient@example.com --mail-from sender@example.com -T - + + + +# +# Verify data after the test has been "shot" + + +EHLO 951 +AUTH EXTERNAL += +MAIL FROM: +RCPT TO: +DATA +QUIT + + +mail body +. + + + diff --git a/tests/data/test952 b/tests/data/test952 new file mode 100644 index 000000000..8537afd12 --- /dev/null +++ b/tests/data/test952 @@ -0,0 +1,55 @@ + + + +SMTP +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC4422 +RFC4954 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTH 235 Authenticated + + + +# +# Client-side + + +smtp + + +SMTP external authentication with initial response + + +mail body + + +'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/952' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T - + + + +# +# Verify data after the test has been "shot" + + +EHLO 952 +AUTH EXTERNAL dXNlcg== +MAIL FROM: +RCPT TO: +DATA +QUIT + + +mail body +. + + + diff --git a/tests/data/test953 b/tests/data/test953 new file mode 100644 index 000000000..94db3aaae --- /dev/null +++ b/tests/data/test953 @@ -0,0 +1,55 @@ + + + +SMTP +SASL +SASL AUTH EXTERNAL +SASL-IR +RFC4422 +RFC4954 + + + +# +# Server-side + + +AUTH EXTERNAL +REPLY AUTH 235 Authenticated + + + +# +# Client-side + + +smtp + + +SMTP external authentication with initial response without credentials + + +mail body + + +'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/953' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T - + + + +# +# Verify data after the test has been "shot" + + +EHLO 953 +AUTH EXTERNAL = +MAIL FROM: +RCPT TO: +DATA +QUIT + + +mail body +. + + + -- cgit v1.2.3