Skip to content

Commit

Permalink
tests: test secure mail protocols with explicit SSL requests
Browse files Browse the repository at this point in the history
New tests 987, 988 and 989, disabled for rustls (hanging).

Closes #10077
  • Loading branch information
monnerat authored and bagder committed Feb 25, 2023
1 parent 5855c47 commit 90756d3
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/data/DISABLED
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
407
408
409
987
988
989
1112
1272
%endif
Expand Down
3 changes: 2 additions & 1 deletion tests/data/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
51 changes: 51 additions & 0 deletions tests/data/test987
Original file line number Diff line number Diff line change
@@ -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
To: another

body
</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
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
DATA
QUIT
</protocol>
<upload>
From: different
To: another

body
.
</upload>
</verify>
</testcase>
48 changes: 48 additions & 0 deletions tests/data/test988
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<testcase>
<info>
<keywords>
IMAPS
FETCH
</keywords>
</info>

#
# Server-side
<reply>
<data>
From: me@somewhere
To: fake@nowhere

body

--
yours sincerely
</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
A002 LOGIN "\"user" "sec\"ret{"
A003 SELECT %TESTNUMBER
A004 FETCH 1 BODY[]
A005 LOGOUT
</protocol>
</verify>
</testcase>
48 changes: 48 additions & 0 deletions tests/data/test989
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<testcase>
<info>
<keywords>
POP3S
RETR
</keywords>
</info>

#
# Server-side
<reply>
<data>
From: me@somewhere
To: fake@nowhere

body

--
yours sincerely
</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
USER user
PASS secret
RETR %TESTNUMBER
QUIT
</protocol>
</verify>
</testcase>

0 comments on commit 90756d3

Please sign in to comment.