]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: test secure mail protocols with explicit SSL requests
authorPatrick Monnerat <patrick@monnerat.net>
Sat, 25 Feb 2023 10:49:31 +0000 (11:49 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 25 Feb 2023 10:49:31 +0000 (11:49 +0100)
New tests 987, 988 and 989, disabled for rustls (hanging).

Closes #10077

tests/data/DISABLED
tests/data/Makefile.inc
tests/data/test987 [new file with mode: 0644]
tests/data/test988 [new file with mode: 0644]
tests/data/test989 [new file with mode: 0644]

index 6edc0b4451e2c2a609b31a2f92495453406254aa..3d23895dc0f731f73635076b4efac75e8d3bebcd 100644 (file)
@@ -95,6 +95,9 @@
 407
 408
 409
+987
+988
+989
 1112
 1272
 %endif
index 8da8da05bbd6279e0ad36e37c955ae1494e8b737..13211651f7784b82f64a612e9bbf7e12e1cbfc07 100644 (file)
@@ -124,7 +124,8 @@ test954 test955 test956 test957 test958 test959 test960 test961 test962 \
 test963 test964 test965 test966 test967 test968 test969 test970 test971 \
 test972 test973 test974 test975 test976 test977 test978 \
 \
-test980 test981 test982 test983 test984 test985 test986 \
+test980 test981 test982 test983 test984 test985 test986 test987 test988 \
+test989 \
 \
 test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 \
 test1008 test1009 test1010 test1011 test1012 test1013 test1014 test1015 \
diff --git a/tests/data/test987 b/tests/data/test987
new file mode 100644 (file)
index 0000000..9176748
--- /dev/null
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+SMTPS
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtps
+</server>
+ <name>
+SMTPS with redundant explicit SSL request
+ </name>
+<stdin>
+From: different\r
+To: another\r
+\r
+body\r
+</stdin>
+ <command>
+-k --ssl-reqd --mail-rcpt recipient@example.com --mail-from sender@example.com -T - smtps://%HOSTIP:%SMTPSPORT/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO %TESTNUMBER\r
+MAIL FROM:<sender@example.com>\r
+RCPT TO:<recipient@example.com>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test988 b/tests/data/test988
new file mode 100644 (file)
index 0000000..71c873c
--- /dev/null
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+IMAPS
+FETCH
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+body\r
+\r
+--\r
+  yours sincerely\r
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imaps
+</server>
+ <name>
+IMAPS FETCH with redundant explicit SSL request
+ </name>
+ <command>
+-k --ssl-reqd -u '"user:sec"ret{' 'imaps://%HOSTIP:%IMAPSPORT/%TESTNUMBER/;MAILINDEX=1'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY\r
+A002 LOGIN "\"user" "sec\"ret{"\r
+A003 SELECT %TESTNUMBER\r
+A004 FETCH 1 BODY[]\r
+A005 LOGOUT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test989 b/tests/data/test989
new file mode 100644 (file)
index 0000000..2fee9f8
--- /dev/null
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+POP3S
+RETR
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+body\r
+\r
+--\r
+  yours sincerely\r
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3s
+</server>
+ <name>
+POP3S RETR with redundant explicit SSL request
+ </name>
+ <command>
+-k --ssl-reqd  -u user:secret pop3s://%HOSTIP:%POP3SPORT/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+RETR %TESTNUMBER\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>