tests: Added SMTP DIGEST-MD5 authentication test
authorSteve Holme <steve_holme@hotmail.com>
Fri, 25 Oct 2013 18:22:30 +0000 (19:22 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Fri, 25 Oct 2013 18:31:51 +0000 (19:31 +0100)
tests/data/Makefile.am
tests/data/test907 [new file with mode: 0644]

index b985b70..39d811f 100644 (file)
@@ -70,7 +70,7 @@ test850 test851 test852 test853 test854 test855 test856 test857 test858 \
 test859 test860 test861 test862 test863 test864 test865 test866 test867 \
 test868 test869 test870 \
 \
-test900 test901 test902 test903 test904 test905 test906                 \
+test900 test901 test902 test903 test904 test905 test906 test907         \
 test909 test910 test911 test912 test913 test914 test915 test916 test917 \
 test918 test919 test920 \
 \
diff --git a/tests/data/test907 b/tests/data/test907
new file mode 100644 (file)
index 0000000..8b398d9
--- /dev/null
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SMTP AUTH DIGEST-MD5
+RFC2831
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5
+REPLY AUTH 334 cmVhbG09ImN1cmwiLG5vbmNlPSI1MzAwZDE3YTFkNjk1YmQ0MTFlNGNkZjk2Zjk1NDhjMjNjZWQ2MTc1IixhbGdvcml0aG09bWQ1LXNlc3MscW9wPSJhdXRoIg==
+REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIxMjM0NTY3OCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9YTA2OTE1YTA1ODA3ZDc0MTg0YTkxYjM2NjE2ZTZiOGM= 334
+REPLY  235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+debug
+crypto
+</features>
+ <name>
+SMTP DIGEST-MD5 authentication
+ </name>
+<stdin>
+mail body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/907 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 907\r
+AUTH DIGEST-MD5\r
+dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIxMjM0NTY3OCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9YTA2OTE1YTA1ODA3ZDc0MTg0YTkxYjM2NjE2ZTZiOGM=\r
+\r
+MAIL FROM:<sender@example.com>\r
+RCPT TO:<recipient@example.com>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+mail body\r
+.\r
+</upload>
+</verify>
+</testcase>