285 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc |
285 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc |
286 $ echo "localhost = 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca" >> copy-pull/.hg/hgrc |
286 $ echo "localhost = 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca" >> copy-pull/.hg/hgrc |
287 $ echo "127.0.0.1 = 914f1aff87249c09b6859b88b1906d30756491ca" >> copy-pull/.hg/hgrc |
287 $ echo "127.0.0.1 = 914f1aff87249c09b6859b88b1906d30756491ca" >> copy-pull/.hg/hgrc |
288 |
288 |
289 - works without cacerts |
289 - works without cacerts |
290 $ hg -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=! |
290 $ hg -R copy-pull id https://localhost:$HGPORT/ --insecure |
291 5fed3813f7f5 |
291 5fed3813f7f5 |
292 |
292 |
293 - multiple fingerprints specified and first matches |
293 - multiple fingerprints specified and first matches |
294 $ hg --config 'hostfingerprints.localhost=914f1aff87249c09b6859b88b1906d30756491ca, deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=! |
294 $ hg --config 'hostfingerprints.localhost=914f1aff87249c09b6859b88b1906d30756491ca, deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' -R copy-pull id https://localhost:$HGPORT/ --insecure |
295 5fed3813f7f5 |
295 5fed3813f7f5 |
296 |
296 |
297 - multiple fingerprints specified and last matches |
297 - multiple fingerprints specified and last matches |
298 $ hg --config 'hostfingerprints.localhost=deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, 914f1aff87249c09b6859b88b1906d30756491ca' -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=! |
298 $ hg --config 'hostfingerprints.localhost=deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, 914f1aff87249c09b6859b88b1906d30756491ca' -R copy-pull id https://localhost:$HGPORT/ --insecure |
299 5fed3813f7f5 |
299 5fed3813f7f5 |
300 |
300 |
301 - multiple fingerprints specified and none match |
301 - multiple fingerprints specified and none match |
302 |
302 |
303 $ hg --config 'hostfingerprints.localhost=deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, aeadbeefdeadbeefdeadbeefdeadbeefdeadbeef' -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=! |
303 $ hg --config 'hostfingerprints.localhost=deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, aeadbeefdeadbeefdeadbeefdeadbeefdeadbeef' -R copy-pull id https://localhost:$HGPORT/ --insecure |
304 abort: certificate for localhost has unexpected fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca |
304 abort: certificate for localhost has unexpected fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca |
305 (check hostfingerprint configuration) |
305 (check hostfingerprint configuration) |
306 [255] |
306 [255] |
307 |
307 |
308 - fails when cert doesn't match hostname (port is ignored) |
308 - fails when cert doesn't match hostname (port is ignored) |