--- a/mercurial/commands.py Tue Oct 18 17:44:42 2016 -0700
+++ b/mercurial/commands.py Wed Oct 19 15:07:11 2016 -0700
@@ -68,6 +68,7 @@
setdiscovery,
simplemerge,
sshserver,
+ sslutil,
streamclone,
templatekw,
templater,
@@ -2703,6 +2704,25 @@
fm.write('pythonlib', _("checking Python lib (%s)...\n"),
os.path.dirname(os.__file__))
+ security = set(sslutil.supportedprotocols)
+ if sslutil.hassni:
+ security.add('sni')
+
+ fm.write('pythonsecurity', _("checking Python security support (%s)\n"),
+ fm.formatlist(sorted(security), name='protocol',
+ fmt='%s', sep=','))
+
+ # These are warnings, not errors. So don't increment problem count. This
+ # may change in the future.
+ if 'tls1.2' not in security:
+ fm.plain(_(' TLS 1.2 not supported by Python install; '
+ 'network connections lack modern security\n'))
+ if 'sni' not in security:
+ fm.plain(_(' SNI not supported by Python install; may have '
+ 'connectivity issues with some servers\n'))
+
+ # TODO print CA cert info
+
# hg version
hgver = util.version()
fm.write('hgver', _("checking Mercurial version (%s)\n"),