|
@@
-49,38
+49,13
b' Test server address cannot be reused'
|
|
49
|
Our test cert is not signed by a trusted CA. It should fail to verify if
|
|
49
|
Our test cert is not signed by a trusted CA. It should fail to verify if
|
|
50
|
we are able to load CA certs.
|
|
50
|
we are able to load CA certs.
|
|
51
|
|
|
51
|
|
|
52
|
#if sslcontext no-defaultcacertsloaded
|
|
52
|
#if no-defaultcacertsloaded
|
|
53
|
$ hg clone https://localhost:$HGPORT/ copy-pull
|
|
53
|
$ hg clone https://localhost:$HGPORT/ copy-pull
|
|
54
|
(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)
|
|
54
|
(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)
|
|
55
|
abort: error: *certificate verify failed* (glob)
|
|
55
|
abort: error: *certificate verify failed* (glob)
|
|
56
|
[255]
|
|
56
|
[255]
|
|
57
|
#endif
|
|
57
|
#endif
|
|
58
|
|
|
58
|
|
|
59
|
#if no-sslcontext
|
|
|
|
|
60
|
$ hg clone https://localhost:$HGPORT/ copy-pull
|
|
|
|
|
61
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
|
|
|
62
|
(using CA certificates from *; if you see this message, your Mercurial install is not properly configured; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message) (glob) (?)
|
|
|
|
|
63
|
abort: error: *certificate verify failed* (glob)
|
|
|
|
|
64
|
[255]
|
|
|
|
|
65
|
#endif
|
|
|
|
|
66
|
|
|
|
|
|
67
|
#if no-sslcontext windows
|
|
|
|
|
68
|
$ hg clone https://localhost:$HGPORT/ copy-pull
|
|
|
|
|
69
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info
|
|
|
|
|
70
|
(unable to load Windows CA certificates; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message)
|
|
|
|
|
71
|
abort: error: *certificate verify failed* (glob)
|
|
|
|
|
72
|
[255]
|
|
|
|
|
73
|
#endif
|
|
|
|
|
74
|
|
|
|
|
|
75
|
#if no-sslcontext osx
|
|
|
|
|
76
|
$ hg clone https://localhost:$HGPORT/ copy-pull
|
|
|
|
|
77
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info
|
|
|
|
|
78
|
(unable to load CA certificates; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message)
|
|
|
|
|
79
|
abort: localhost certificate error: no certificate received
|
|
|
|
|
80
|
(set hostsecurity.localhost:certfingerprints=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 config setting or use --insecure to connect insecurely)
|
|
|
|
|
81
|
[255]
|
|
|
|
|
82
|
#endif
|
|
|
|
|
83
|
|
|
|
|
|
84
|
#if defaultcacertsloaded
|
|
59
|
#if defaultcacertsloaded
|
|
85
|
$ hg clone https://localhost:$HGPORT/ copy-pull
|
|
60
|
$ hg clone https://localhost:$HGPORT/ copy-pull
|
|
86
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
61
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
@@
-101,35
+76,21
b' C:/path/to/msysroot will print on Window'
|
|
101
|
A malformed per-host certificate file will raise an error
|
|
76
|
A malformed per-host certificate file will raise an error
|
|
102
|
|
|
77
|
|
|
103
|
$ echo baddata > badca.pem
|
|
78
|
$ echo baddata > badca.pem
|
|
104
|
#if sslcontext
|
|
|
|
|
105
|
$ hg --config hostsecurity.localhost:verifycertsfile=badca.pem clone https://localhost:$HGPORT/
|
|
79
|
$ hg --config hostsecurity.localhost:verifycertsfile=badca.pem clone https://localhost:$HGPORT/
|
|
106
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
80
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
107
|
abort: error loading CA file badca.pem: * (glob)
|
|
81
|
abort: error loading CA file badca.pem: * (glob)
|
|
108
|
(file is empty or malformed?)
|
|
82
|
(file is empty or malformed?)
|
|
109
|
[255]
|
|
83
|
[255]
|
|
110
|
#else
|
|
|
|
|
111
|
$ hg --config hostsecurity.localhost:verifycertsfile=badca.pem clone https://localhost:$HGPORT/
|
|
|
|
|
112
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
|
|
|
113
|
abort: error: * (glob)
|
|
|
|
|
114
|
[255]
|
|
|
|
|
115
|
#endif
|
|
|
|
|
116
|
|
|
84
|
|
|
117
|
A per-host certificate mismatching the server will fail verification
|
|
85
|
A per-host certificate mismatching the server will fail verification
|
|
118
|
|
|
86
|
|
|
119
|
(modern ssl is able to discern whether the loaded cert is a CA cert)
|
|
87
|
(modern ssl is able to discern whether the loaded cert is a CA cert)
|
|
120
|
#if sslcontext
|
|
|
|
|
121
|
$ hg --config hostsecurity.localhost:verifycertsfile="$CERTSDIR/client-cert.pem" clone https://localhost:$HGPORT/
|
|
88
|
$ hg --config hostsecurity.localhost:verifycertsfile="$CERTSDIR/client-cert.pem" clone https://localhost:$HGPORT/
|
|
122
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
89
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
123
|
(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)
|
|
90
|
(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)
|
|
124
|
(the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
|
|
91
|
(the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
|
|
125
|
abort: error: *certificate verify failed* (glob)
|
|
92
|
abort: error: *certificate verify failed* (glob)
|
|
126
|
[255]
|
|
93
|
[255]
|
|
127
|
#else
|
|
|
|
|
128
|
$ hg --config hostsecurity.localhost:verifycertsfile="$CERTSDIR/client-cert.pem" clone https://localhost:$HGPORT/
|
|
|
|
|
129
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
|
|
|
130
|
abort: error: *certificate verify failed* (glob)
|
|
|
|
|
131
|
[255]
|
|
|
|
|
132
|
#endif
|
|
|
|
|
133
|
|
|
94
|
|
|
134
|
A per-host certificate matching the server's cert will be accepted
|
|
95
|
A per-host certificate matching the server's cert will be accepted
|
|
135
|
|
|
96
|
|
|
@@
-269,20
+230,12
b' empty cacert file'
|
|
269
|
|
|
230
|
|
|
270
|
$ touch emptycafile
|
|
231
|
$ touch emptycafile
|
|
271
|
|
|
232
|
|
|
272
|
#if sslcontext
|
|
|
|
|
273
|
$ hg --config web.cacerts=emptycafile -R copy-pull pull
|
|
233
|
$ hg --config web.cacerts=emptycafile -R copy-pull pull
|
|
274
|
pulling from https://localhost:$HGPORT/
|
|
234
|
pulling from https://localhost:$HGPORT/
|
|
275
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
235
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
276
|
abort: error loading CA file emptycafile: * (glob)
|
|
236
|
abort: error loading CA file emptycafile: * (glob)
|
|
277
|
(file is empty or malformed?)
|
|
237
|
(file is empty or malformed?)
|
|
278
|
[255]
|
|
238
|
[255]
|
|
279
|
#else
|
|
|
|
|
280
|
$ hg --config web.cacerts=emptycafile -R copy-pull pull
|
|
|
|
|
281
|
pulling from https://localhost:$HGPORT/
|
|
|
|
|
282
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
|
|
|
283
|
abort: error: * (glob)
|
|
|
|
|
284
|
[255]
|
|
|
|
|
285
|
#endif
|
|
|
|
|
286
|
|
|
239
|
|
|
287
|
cacert mismatch
|
|
240
|
cacert mismatch
|
|
288
|
|
|
241
|
|
|
@@
-344,20
+297,6
b' Disabling the TLS 1.0 warning works'
|
|
344
|
> --config hostsecurity.disabletls10warning=true
|
|
297
|
> --config hostsecurity.disabletls10warning=true
|
|
345
|
5fed3813f7f5
|
|
298
|
5fed3813f7f5
|
|
346
|
|
|
299
|
|
|
347
|
Error message for setting ciphers is different depending on SSLContext support
|
|
|
|
|
348
|
|
|
|
|
|
349
|
#if no-sslcontext
|
|
|
|
|
350
|
$ P="$CERTSDIR" hg --config hostsecurity.ciphers=invalid -R copy-pull id https://localhost:$HGPORT/
|
|
|
|
|
351
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info
|
|
|
|
|
352
|
abort: *No cipher can be selected. (glob)
|
|
|
|
|
353
|
[255]
|
|
|
|
|
354
|
|
|
|
|
|
355
|
$ P="$CERTSDIR" hg --config hostsecurity.ciphers=HIGH -R copy-pull id https://localhost:$HGPORT/
|
|
|
|
|
356
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info
|
|
|
|
|
357
|
5fed3813f7f5
|
|
|
|
|
358
|
#endif
|
|
|
|
|
359
|
|
|
|
|
|
360
|
#if sslcontext
|
|
|
|
|
361
|
Setting ciphers to an invalid value aborts
|
|
300
|
Setting ciphers to an invalid value aborts
|
|
362
|
$ P="$CERTSDIR" hg --config hostsecurity.ciphers=invalid -R copy-pull id https://localhost:$HGPORT/
|
|
301
|
$ P="$CERTSDIR" hg --config hostsecurity.ciphers=invalid -R copy-pull id https://localhost:$HGPORT/
|
|
363
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
302
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
@@
-376,7
+315,6
b' Changing the cipher string works'
|
|
376
|
$ P="$CERTSDIR" hg --config hostsecurity.ciphers=HIGH -R copy-pull id https://localhost:$HGPORT/
|
|
315
|
$ P="$CERTSDIR" hg --config hostsecurity.ciphers=HIGH -R copy-pull id https://localhost:$HGPORT/
|
|
377
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
316
|
warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
|
|
378
|
5fed3813f7f5
|
|
317
|
5fed3813f7f5
|
|
379
|
#endif
|
|
|
|
|
380
|
|
|
318
|
|
|
381
|
Fingerprints
|
|
319
|
Fingerprints
|
|
382
|
|
|
320
|
|
|
@@
-449,7
+387,7
b' Ports used by next test. Kill servers.'
|
|
449
|
$ killdaemons.py hg1.pid
|
|
387
|
$ killdaemons.py hg1.pid
|
|
450
|
$ killdaemons.py hg2.pid
|
|
388
|
$ killdaemons.py hg2.pid
|
|
451
|
|
|
389
|
|
|
452
|
#if sslcontext tls1.2
|
|
390
|
#if tls1.2
|
|
453
|
Start servers running supported TLS versions
|
|
391
|
Start servers running supported TLS versions
|
|
454
|
|
|
392
|
|
|
455
|
$ cd test
|
|
393
|
$ cd test
|
|
@@
-603,8
+541,6
b' Test https with cert problems through pr'
|
|
603
|
|
|
541
|
|
|
604
|
$ killdaemons.py hg0.pid
|
|
542
|
$ killdaemons.py hg0.pid
|
|
605
|
|
|
543
|
|
|
606
|
#if sslcontext
|
|
|
|
|
607
|
|
|
|
|
|
608
|
$ cd test
|
|
544
|
$ cd test
|
|
609
|
|
|
545
|
|
|
610
|
Missing certificate file(s) are detected
|
|
546
|
Missing certificate file(s) are detected
|
|
@@
-668,5
+604,3
b' Missing certficate and key files result '
|
|
668
|
abort: certificate file (*/missing/key) does not exist; cannot connect to localhost (glob)
|
|
604
|
abort: certificate file (*/missing/key) does not exist; cannot connect to localhost (glob)
|
|
669
|
(restore missing file or fix references in Mercurial config)
|
|
605
|
(restore missing file or fix references in Mercurial config)
|
|
670
|
[255]
|
|
606
|
[255]
|
|
671
|
|
|
|
|
|
672
|
#endif
|
|
|
|