Imported Upstream version 7.59.0
[platform/upstream/curl.git] / tests / data / test834
1 <testcase>
2 <info>
3 <keywords>
4 IMAP
5 SASL
6 SASL AUTH NTLM
7 SASL AUTH PLAIN
8 SASL DOWNGRADE
9 </keywords>
10 </info>
11
12 #
13 # Server-side
14 <reply>
15 <servercmd>
16 AUTH NTLM PLAIN
17 REPLY "AUTHENTICATE NTLM" +
18 REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + Rubbish
19 REPLY * A002 NO AUTH exchange cancelled by client
20 REPLY "AUTHENTICATE PLAIN" +
21 REPLY dXNlcgB1c2VyAHNlY3JldA== A003 OK AUTHENTICATE completed
22 </servercmd>
23 <data>
24 From: me@somewhere
25 To: fake@nowhere
26
27 body
28
29 --
30   yours sincerely
31 </data>
32 </reply>
33
34 #
35 # Client-side
36 <client>
37 <server>
38 imap
39 </server>
40 <features>
41 NTLM
42 !SSPI
43 </features>
44  <name>
45 IMAP NTLM authentication with SASL downgrade
46  </name>
47  <setenv>
48 # we force our own host name, in order to make the test machine independent
49 CURL_GETHOSTNAME=curlhost
50 # we try to use the LD_PRELOAD hack, if not a debug build
51 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
52  </setenv>
53  <command>
54 'imap://%HOSTIP:%IMAPPORT/834/;UID=1' -u user:secret
55 </command>
56 <precheck>
57 chkhostname curlhost
58 </precheck>
59 </client>
60
61 #
62 # Verify data after the test has been "shot"
63 <verify>
64 <protocol>
65 A001 CAPABILITY
66 A002 AUTHENTICATE NTLM
67 TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
68 *
69 A003 AUTHENTICATE PLAIN
70 dXNlcgB1c2VyAHNlY3JldA==
71 A004 SELECT 834
72 A005 FETCH 1 BODY[]
73 A006 LOGOUT
74 </protocol>
75 </verify>
76 </testcase>