##// END OF EJS Templates
sslutil: ensure serverhostname is bytes when formatting...
Gregory Szorc -
r41456:f07aff7e default
parent child Browse files
Show More
@@ -454,7 +454,7 b' def wrapsocket(sock, keyfile, certfile, '
454 'server; see '
454 'server; see '
455 'https://mercurial-scm.org/wiki/SecureConnections '
455 'https://mercurial-scm.org/wiki/SecureConnections '
456 'for more info)\n') % (
456 'for more info)\n') % (
457 serverhostname,
457 pycompat.bytesurl(serverhostname),
458 ', '.join(sorted(supportedprotocols))))
458 ', '.join(sorted(supportedprotocols))))
459 else:
459 else:
460 ui.warn(_(
460 ui.warn(_(
@@ -463,7 +463,8 b' def wrapsocket(sock, keyfile, certfile, '
463 'supports TLS 1.0 because it has known security '
463 'supports TLS 1.0 because it has known security '
464 'vulnerabilities; see '
464 'vulnerabilities; see '
465 'https://mercurial-scm.org/wiki/SecureConnections '
465 'https://mercurial-scm.org/wiki/SecureConnections '
466 'for more info)\n') % serverhostname)
466 'for more info)\n') %
467 pycompat.bytesurl(serverhostname))
467 else:
468 else:
468 # We attempted TLS 1.1+. We can only get here if the client
469 # We attempted TLS 1.1+. We can only get here if the client
469 # supports the configured protocol. So the likely reason is
470 # supports the configured protocol. So the likely reason is
@@ -473,14 +474,15 b' def wrapsocket(sock, keyfile, certfile, '
473 '(could not negotiate a common security protocol (%s+) '
474 '(could not negotiate a common security protocol (%s+) '
474 'with %s; the likely cause is Mercurial is configured '
475 'with %s; the likely cause is Mercurial is configured '
475 'to be more secure than the server can support)\n') % (
476 'to be more secure than the server can support)\n') % (
476 settings['protocolui'], serverhostname))
477 settings['protocolui'],
478 pycompat.bytesurl(serverhostname)))
477 ui.warn(_('(consider contacting the operator of this '
479 ui.warn(_('(consider contacting the operator of this '
478 'server and ask them to support modern TLS '
480 'server and ask them to support modern TLS '
479 'protocol versions; or, set '
481 'protocol versions; or, set '
480 'hostsecurity.%s:minimumprotocol=tls1.0 to allow '
482 'hostsecurity.%s:minimumprotocol=tls1.0 to allow '
481 'use of legacy, less secure protocols when '
483 'use of legacy, less secure protocols when '
482 'communicating with this server)\n') %
484 'communicating with this server)\n') %
483 serverhostname)
485 pycompat.bytesurl(serverhostname))
484 ui.warn(_(
486 ui.warn(_(
485 '(see https://mercurial-scm.org/wiki/SecureConnections '
487 '(see https://mercurial-scm.org/wiki/SecureConnections '
486 'for more info)\n'))
488 'for more info)\n'))
General Comments 0
You need to be logged in to leave comments. Login now