comparison tests/test-https.t @ 49057:27ef2aa953dd

sslutil: support TLSV1_ALERT_PROTOCOL_VERSION reason code It looks like python 3.10 returns a different reason code on protocol version mismatch. Differential Revision: https://phab.mercurial-scm.org/D12491
author Julien Cristau <jcristau@debian.org>
date Sat, 09 Apr 2022 14:41:55 +0200
parents 7ea2bd2043d1
children d8a38186a092
comparison
equal deleted inserted replaced
49056:7ea2bd2043d1 49057:27ef2aa953dd
372 372
373 $ P="$CERTSDIR" hg id https://localhost:$HGPORT/ 373 $ P="$CERTSDIR" hg id https://localhost:$HGPORT/
374 (could not negotiate a common security protocol (tls1.1+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support) 374 (could not negotiate a common security protocol (tls1.1+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support)
375 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server) 375 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server)
376 (see https://mercurial-scm.org/wiki/SecureConnections for more info) 376 (see https://mercurial-scm.org/wiki/SecureConnections for more info)
377 abort: error: .*(unsupported protocol|wrong ssl version).* (re) 377 abort: error: .*(unsupported protocol|wrong ssl version|alert protocol version).* (re)
378 [100] 378 [100]
379 379
380 $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.1 id https://localhost:$HGPORT/ 380 $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.1 id https://localhost:$HGPORT/
381 (could not negotiate a common security protocol (tls1.1+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support) 381 (could not negotiate a common security protocol (tls1.1+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support)
382 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server) 382 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server)
383 (see https://mercurial-scm.org/wiki/SecureConnections for more info) 383 (see https://mercurial-scm.org/wiki/SecureConnections for more info)
384 abort: error: .*(unsupported protocol|wrong ssl version).* (re) 384 abort: error: .*(unsupported protocol|wrong ssl version|alert protocol version).* (re)
385 [100] 385 [100]
386 $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.2 id https://localhost:$HGPORT/ 386 $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.2 id https://localhost:$HGPORT/
387 (could not negotiate a common security protocol (tls1.2+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support) 387 (could not negotiate a common security protocol (tls1.2+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support)
388 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server) 388 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server)
389 (see https://mercurial-scm.org/wiki/SecureConnections for more info) 389 (see https://mercurial-scm.org/wiki/SecureConnections for more info)
390 abort: error: .*(unsupported protocol|wrong ssl version).* (re) 390 abort: error: .*(unsupported protocol|wrong ssl version|alert protocol version).* (re)
391 [100] 391 [100]
392 $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.2 id https://localhost:$HGPORT1/ 392 $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.2 id https://localhost:$HGPORT1/
393 (could not negotiate a common security protocol (tls1.2+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support) 393 (could not negotiate a common security protocol (tls1.2+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support)
394 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server) 394 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server)
395 (see https://mercurial-scm.org/wiki/SecureConnections for more info) 395 (see https://mercurial-scm.org/wiki/SecureConnections for more info)
396 abort: error: .*(unsupported protocol|wrong ssl version).* (re) 396 abort: error: .*(unsupported protocol|wrong ssl version|alert protocol version).* (re)
397 [100] 397 [100]
398 398
399 --insecure will allow TLS 1.0 connections and override configs 399 --insecure will allow TLS 1.0 connections and override configs
400 400
401 $ hg --config hostsecurity.minimumprotocol=tls1.2 id --insecure https://localhost:$HGPORT1/ 401 $ hg --config hostsecurity.minimumprotocol=tls1.2 id --insecure https://localhost:$HGPORT1/
415 $ P="$CERTSDIR" hg id https://localhost:$HGPORT/ \ 415 $ P="$CERTSDIR" hg id https://localhost:$HGPORT/ \
416 > --config hostsecurity.localhost:minimumprotocol=tls1.2 416 > --config hostsecurity.localhost:minimumprotocol=tls1.2
417 (could not negotiate a common security protocol (tls1.2+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support) 417 (could not negotiate a common security protocol (tls1.2+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support)
418 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server) 418 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server)
419 (see https://mercurial-scm.org/wiki/SecureConnections for more info) 419 (see https://mercurial-scm.org/wiki/SecureConnections for more info)
420 abort: error: .*(unsupported protocol|wrong ssl version).* (re) 420 abort: error: .*(unsupported protocol|wrong ssl version|alert protocol version).* (re)
421 [100] 421 [100]
422 422
423 .hg/hgrc file [hostsecurity] settings are applied to remote ui instances (issue5305) 423 .hg/hgrc file [hostsecurity] settings are applied to remote ui instances (issue5305)
424 424
425 $ cat >> copy-pull/.hg/hgrc << EOF 425 $ cat >> copy-pull/.hg/hgrc << EOF
428 > EOF 428 > EOF
429 $ P="$CERTSDIR" hg -R copy-pull id https://localhost:$HGPORT/ 429 $ P="$CERTSDIR" hg -R copy-pull id https://localhost:$HGPORT/
430 (could not negotiate a common security protocol (tls1.2+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support) 430 (could not negotiate a common security protocol (tls1.2+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support)
431 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server) 431 (consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.localhost:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server)
432 (see https://mercurial-scm.org/wiki/SecureConnections for more info) 432 (see https://mercurial-scm.org/wiki/SecureConnections for more info)
433 abort: error: .*(unsupported protocol|wrong ssl version).* (re) 433 abort: error: .*(unsupported protocol|wrong ssl version|alert protocol version).* (re)
434 [100] 434 [100]
435 435
436 $ killdaemons.py hg0.pid 436 $ killdaemons.py hg0.pid
437 $ killdaemons.py hg1.pid 437 $ killdaemons.py hg1.pid
438 $ killdaemons.py hg2.pid 438 $ killdaemons.py hg2.pid