Mercurial > hg
comparison tests/test-patchbomb-tls.t @ 50730:cfb6ca77e6bc stable
tests: improve test-patchbomb-tls.t by by logging errors and data
The actual SSL error might be like:
::1 ssl error: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1002)
and will probably vary so much that it can't be checked in the test. It is
however very useful when debugging failures.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 26 Jun 2023 15:51:39 +0200 |
parents | 5644f6286618 |
children | b3a5af04da35 |
comparison
equal
deleted
inserted
replaced
50729:5644f6286618 | 50730:cfb6ca77e6bc |
---|---|
74 abort: unable to verify security of localhost (no loaded CA certificates); refusing to connect | 74 abort: unable to verify security of localhost (no loaded CA certificates); refusing to connect |
75 (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) | 75 (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) |
76 [150] | 76 [150] |
77 | 77 |
78 $ cat ../log | 78 $ cat ../log |
79 * ssl error (glob) | 79 * ssl error: * (glob) |
80 $ : > ../log | 80 $ : > ../log |
81 | 81 |
82 With global certificates: | 82 With global certificates: |
83 | 83 |
84 $ try --debug --config web.cacerts="$CERTSDIR/pub.pem" | 84 $ try --debug --config web.cacerts="$CERTSDIR/pub.pem" |
90 (verifying remote certificate) | 90 (verifying remote certificate) |
91 sending [PATCH] a ... | 91 sending [PATCH] a ... |
92 | 92 |
93 $ cat ../log | 93 $ cat ../log |
94 * from=quux to=foo, bar (glob) | 94 * from=quux to=foo, bar (glob) |
95 MIME-Version: 1.0 | |
96 Content-Type: text/plain; charset="us-ascii" | |
97 Content-Transfer-Encoding: 7bit | |
98 Subject: [PATCH] a | |
99 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
100 X-Mercurial-Series-Index: 1 | |
101 X-Mercurial-Series-Total: 1 | |
102 Message-Id: <*@test-hostname> (glob) | |
103 X-Mercurial-Series-Id: <*@test-hostname> (glob) | |
104 User-Agent: Mercurial-patchbomb* (glob) | |
105 Date: * (glob) | |
106 From: quux | |
107 To: foo | |
108 Cc: bar | |
109 | |
110 # HG changeset patch | |
111 # User test | |
112 # Date 1 0 | |
113 # Thu Jan 01 00:00:01 1970 +0000 | |
114 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
115 # Parent 0000000000000000000000000000000000000000 | |
116 a | |
117 | |
118 diff -r 0000000000000000000000000000000000000000 -r 8580ff50825a50c8f716709acdf8de0deddcd6ab a | |
119 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
120 +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
121 @@ -0,0 +1,1 @@ | |
122 +a | |
123 | |
95 $ : > ../log | 124 $ : > ../log |
96 | 125 |
97 With invalid certificates: | 126 With invalid certificates: |
98 | 127 |
99 $ try --config web.cacerts="$CERTSDIR/pub-other.pem" | 128 $ try --config web.cacerts="$CERTSDIR/pub-other.pem" |
103 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !) | 132 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !) |
104 (?i)abort: .*?certificate.verify.failed.* (re) | 133 (?i)abort: .*?certificate.verify.failed.* (re) |
105 [255] | 134 [255] |
106 | 135 |
107 $ cat ../log | 136 $ cat ../log |
108 * ssl error (glob) | 137 * ssl error: * (glob) |
109 $ : > ../log | 138 $ : > ../log |
110 | 139 |
111 $ cd .. | 140 $ cd .. |