author | Pierre-Yves David <pierre-yves.david@octobus.net> |
Wed, 21 Feb 2024 13:05:29 +0100 | |
changeset 51420 | ac1c75188440 |
parent 50732 | b3a5af04da35 |
child 51498 | 25055932042a |
permissions | -rw-r--r-- |
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 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
3 |
Set up SMTP server: |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
4 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
5 |
$ CERTSDIR="$TESTDIR/sslcerts" |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
6 |
$ 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
|
7 |
|
50729
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
8 |
$ "$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
|
9 |
> --tls smtps --certificate `pwd`/server.pem |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
10 |
$ cat a.pid >> $DAEMON_PIDS |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
11 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
12 |
Set up repository: |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
13 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
14 |
$ hg init t |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
15 |
$ cd t |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
16 |
$ cat <<EOF >> .hg/hgrc |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
17 |
> [extensions] |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
18 |
> patchbomb = |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
19 |
> [email] |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
20 |
> method = smtp |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
21 |
> [smtp] |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
22 |
> host = localhost |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
23 |
> port = $HGPORT |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
24 |
> tls = smtps |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
25 |
> EOF |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
26 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
27 |
$ echo a > a |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
28 |
$ hg commit -Ama -d '1 0' |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
29 |
adding a |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
30 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
31 |
Utility functions: |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
32 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
33 |
$ DISABLECACERTS= |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
34 |
$ try () { |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
35 |
> 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
|
36 |
> } |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
37 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
38 |
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
|
39 |
we are able to load CA certs: |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
40 |
|
44881
89f83e47e9c9
tests: remove "sslcontext" check
Manuel Jacob <me@manueljacob.de>
parents:
44879
diff
changeset
|
41 |
#if no-defaultcacertsloaded |
29333
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
42 |
$ try |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
43 |
this patch series consists of 1 patches. |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
44 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
45 |
|
29449
5b71a8d7f7ff
sslutil: emit warning when no CA certificates loaded
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29411
diff
changeset
|
46 |
(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
|
47 |
(?i)abort: .*?certificate.verify.failed.* (re) |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
48 |
[255] |
50732
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
49 |
|
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
50 |
$ cat ../log |
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
51 |
* ssl error: * (glob) |
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
52 |
$ : > ../log |
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
53 |
|
29333
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
54 |
#endif |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
55 |
|
29481
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
56 |
#if defaultcacertsloaded |
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
57 |
$ try |
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
58 |
this patch series consists of 1 patches. |
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
59 |
|
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
60 |
|
33494
30f2715be123
sslutil: inform the user about how to fix an incomplete certificate chain
Matt Harbison <matt_harbison@yahoo.com>
parents:
32940
diff
changeset
|
61 |
(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
|
62 |
(?i)abort: .*?certificate.verify.failed.* (re) |
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
63 |
[255] |
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
64 |
|
50732
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
65 |
$ cat ../log |
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
66 |
* ssl error: * (glob) |
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
67 |
$ : > ../log |
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
68 |
|
29481
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
69 |
#endif |
5caa415aa48b
tests: better testing of loaded certificates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29449
diff
changeset
|
70 |
|
29333
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
71 |
$ DISABLECACERTS="--config devel.disableloaddefaultcerts=true" |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
72 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
73 |
Without certificates: |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
74 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
75 |
$ try --debug |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
76 |
this patch series consists of 1 patches. |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
77 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
78 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
79 |
(using smtps) |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
80 |
sending mail: smtp host localhost, port * (glob) |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
81 |
(verifying remote certificate) |
29411
e1778b9c8d53
sslutil: abort when unable to verify peer connection (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
29333
diff
changeset
|
82 |
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
|
83 |
(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
|
84 |
[150] |
29333
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
85 |
|
50729
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
86 |
$ cat ../log |
50732
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
87 |
connection from * (glob) |
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
88 |
no hello: b'' |
50729
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
89 |
$ : > ../log |
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
90 |
|
29333
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
91 |
With global certificates: |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
92 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
93 |
$ 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
|
94 |
this patch series consists of 1 patches. |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
95 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
96 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
97 |
(using smtps) |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
98 |
sending mail: smtp host localhost, port * (glob) |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
99 |
(verifying remote certificate) |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
100 |
sending [PATCH] a ... |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
101 |
|
50729
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
102 |
$ cat ../log |
50732
b3a5af04da35
tests: use simple mock smtp server instead of deprecated asyncore smtpd
Mads Kiilerich <mads@kiilerich.com>
parents:
50730
diff
changeset
|
103 |
connection from * (glob) |
50729
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
104 |
* 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
|
105 |
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
|
106 |
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
|
107 |
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
|
108 |
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
|
109 |
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
|
110 |
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
|
111 |
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
|
112 |
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
|
113 |
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
|
114 |
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
|
115 |
Date: * (glob) |
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
116 |
From: quux |
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
117 |
To: foo |
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
118 |
Cc: bar |
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
119 |
|
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
120 |
# 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
|
121 |
# User test |
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
122 |
# 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
|
123 |
# 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
|
124 |
# 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
|
125 |
# Parent 0000000000000000000000000000000000000000 |
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
126 |
a |
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
127 |
|
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
128 |
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
|
129 |
--- /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
|
130 |
+++ 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
|
131 |
@@ -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
|
132 |
+a |
cfb6ca77e6bc
tests: improve test-patchbomb-tls.t by by logging errors and data
Mads Kiilerich <mads@kiilerich.com>
parents:
50729
diff
changeset
|
133 |
|
50729
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
134 |
$ : > ../log |
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
135 |
|
29333
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
136 |
With invalid certificates: |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
137 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
138 |
$ 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
|
139 |
this patch series consists of 1 patches. |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
140 |
|
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
141 |
|
33494
30f2715be123
sslutil: inform the user about how to fix an incomplete certificate chain
Matt Harbison <matt_harbison@yahoo.com>
parents:
32940
diff
changeset
|
142 |
(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
|
143 |
(?i)abort: .*?certificate.verify.failed.* (re) |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
144 |
[255] |
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
145 |
|
50729
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
146 |
$ 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
|
147 |
* ssl error: * (glob) |
50729
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
148 |
$ : > ../log |
5644f6286618
tests: show test-patchbomb-tls.t smtp server log
Mads Kiilerich <mads@kiilerich.com>
parents:
45915
diff
changeset
|
149 |
|
29333
cdef60d9f442
tests: add basic tests for SMTP over SSL
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
150 |
$ cd .. |