annotate tests/test-patchbomb-tls.t @ 51700:7f0cb9ee0534

Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 10:02:46 +0200
parents 8f0b0df79039
children 8fe7c0e1df1e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
1 #require serve ssl
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
2
51498
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
3 $ wait_log() {
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
4 > pattern="$1"
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
5 > for s in $TESTDIR/seq.py 10; do
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
6 > if grep "$pattern" $TESTTMP/log > /dev/null ; then
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
7 > break
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
8 > fi
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
9 > sleep 1
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
10 > done
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
11 > }
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
12
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
13 Set up SMTP server:
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
14
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
15 $ CERTSDIR="$TESTDIR/sslcerts"
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
16 $ cat "$CERTSDIR/priv.pem" "$CERTSDIR/pub.pem" >> server.pem
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
17
50729
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
18 $ "$PYTHON" "$TESTDIR/dummysmtpd.py" -p $HGPORT --pid-file a.pid --logfile log -d \
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
19 > --tls smtps --certificate `pwd`/server.pem
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
20 $ cat a.pid >> $DAEMON_PIDS
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
21
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
22 Set up repository:
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
23
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
24 $ hg init t
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
25 $ cd t
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
26 $ cat <<EOF >> .hg/hgrc
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
27 > [extensions]
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
28 > patchbomb =
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
29 > [email]
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
30 > method = smtp
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
31 > [smtp]
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
32 > host = localhost
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
33 > port = $HGPORT
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
34 > tls = smtps
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
35 > EOF
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
36
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
37 $ echo a > a
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
38 $ hg commit -Ama -d '1 0'
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
39 adding a
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
40
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
41 Utility functions:
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
42
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
43 $ DISABLECACERTS=
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
44 $ try () {
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
45 > hg email $DISABLECACERTS -f quux -t foo -c bar -r tip "$@"
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
46 > }
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
47
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
48 Our test cert is not signed by a trusted CA. It should fail to verify if
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
49 we are able to load CA certs:
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
50
44881
89f83e47e9c9 tests: remove "sslcontext" check
Manuel Jacob <me@manueljacob.de>
parents: 44879
diff changeset
51 #if no-defaultcacertsloaded
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
52 $ try
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
53 this patch series consists of 1 patches.
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
54
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
55
29449
5b71a8d7f7ff sslutil: emit warning when no CA certificates loaded
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29411
diff changeset
56 (an attempt was made to load CA certificates but none were loaded; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error)
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
57 (?i)abort: .*?certificate.verify.failed.* (re)
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
58 [255]
50732
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
59
51498
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
60 $ wait_log "ssl error:"
50732
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
61 $ cat ../log
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
62 * ssl error: * (glob)
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
63 $ : > ../log
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
64
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
65 #endif
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
66
29481
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
67 #if defaultcacertsloaded
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
68 $ try
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
69 this patch series consists of 1 patches.
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
70
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
71
33494
30f2715be123 sslutil: inform the user about how to fix an incomplete certificate chain
Matt Harbison <matt_harbison@yahoo.com>
parents: 32940
diff changeset
72 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
29481
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
73 (?i)abort: .*?certificate.verify.failed.* (re)
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
74 [255]
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
75
51498
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
76 $ wait_log "ssl error:"
50732
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
77 $ cat ../log
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
78 * ssl error: * (glob)
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
79 $ : > ../log
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
80
29481
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
81 #endif
5caa415aa48b tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29449
diff changeset
82
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
83 $ DISABLECACERTS="--config devel.disableloaddefaultcerts=true"
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
84
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
85 Without certificates:
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
86
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
87 $ try --debug
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
88 this patch series consists of 1 patches.
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
89
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
90
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
91 (using smtps)
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
92 sending mail: smtp host localhost, port * (glob)
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
93 (verifying remote certificate)
29411
e1778b9c8d53 sslutil: abort when unable to verify peer connection (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29333
diff changeset
94 abort: unable to verify security of localhost (no loaded CA certificates); refusing to connect
29526
9d02bed8477b tests: regenerate x509 test certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29500
diff changeset
95 (see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error or set hostsecurity.localhost:fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e to trust this server)
45915
8f50dc096cf4 errors: introduce SecurityError and use it in a few places
Martin von Zweigbergk <martinvonz@google.com>
parents: 44895
diff changeset
96 [150]
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
97
51498
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
98 $ wait_log "no hello:"
50729
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
99 $ cat ../log
50732
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
100 connection from * (glob)
51700
7f0cb9ee0534 Backout accidental publication of a large range of revisions
Raphaël Gomès <rgomes@octobus.net>
parents: 51698
diff changeset
101 no hello: b''
50729
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
102 $ : > ../log
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
103
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
104 With global certificates:
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
105
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
106 $ try --debug --config web.cacerts="$CERTSDIR/pub.pem"
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
107 this patch series consists of 1 patches.
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
108
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
109
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
110 (using smtps)
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
111 sending mail: smtp host localhost, port * (glob)
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
112 (verifying remote certificate)
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
113 sending [PATCH] a ...
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
114
50729
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
115 $ cat ../log
50732
b3a5af04da35 tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents: 50730
diff changeset
116 connection from * (glob)
50729
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
117 * from=quux to=foo, bar (glob)
50730
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
118 MIME-Version: 1.0
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
119 Content-Type: text/plain; charset="us-ascii"
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
120 Content-Transfer-Encoding: 7bit
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
121 Subject: [PATCH] a
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
122 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
123 X-Mercurial-Series-Index: 1
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
124 X-Mercurial-Series-Total: 1
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
125 Message-Id: <*@test-hostname> (glob)
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
126 X-Mercurial-Series-Id: <*@test-hostname> (glob)
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
127 User-Agent: Mercurial-patchbomb* (glob)
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
128 Date: * (glob)
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
129 From: quux
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
130 To: foo
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
131 Cc: bar
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
132
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
133 # HG changeset patch
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
134 # User test
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
135 # Date 1 0
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
136 # Thu Jan 01 00:00:01 1970 +0000
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
137 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
138 # Parent 0000000000000000000000000000000000000000
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
139 a
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
140
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
141 diff -r 0000000000000000000000000000000000000000 -r 8580ff50825a50c8f716709acdf8de0deddcd6ab a
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
142 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
143 +++ b/a Thu Jan 01 00:00:01 1970 +0000
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
144 @@ -0,0 +1,1 @@
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
145 +a
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
146
50729
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
147 $ : > ../log
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
148
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
149 With invalid certificates:
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
150
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
151 $ try --config web.cacerts="$CERTSDIR/pub-other.pem"
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
152 this patch series consists of 1 patches.
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
153
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
154
33494
30f2715be123 sslutil: inform the user about how to fix an incomplete certificate chain
Matt Harbison <matt_harbison@yahoo.com>
parents: 32940
diff changeset
155 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
156 (?i)abort: .*?certificate.verify.failed.* (re)
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
157 [255]
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
158
51498
25055932042a tests: fix test-patchbomb-tls.t instability
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50732
diff changeset
159 $ wait_log "ssl error:"
50729
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
160 $ cat ../log
50730
cfb6ca77e6bc tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents: 50729
diff changeset
161 * ssl error: * (glob)
50729
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
162 $ : > ../log
5644f6286618 tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents: 45915
diff changeset
163
29333
cdef60d9f442 tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff changeset
164 $ cd ..