--- a/.hgsigs Sat Apr 06 19:50:03 2013 -0700
+++ b/.hgsigs Mon Apr 08 09:44:26 2013 -0700
@@ -68,3 +68,4 @@
7511d4df752e61fe7ae4f3682e0a0008573b0402 0 iD8DBQBRFYaoywK+sNU5EO8RAuErAJoDyhXn+lptU3+AevVdwAIeNFyR2gCdHzPHyWd+JDeWCUR+pSOBi8O2ppM=
5b7175377babacce80a6c1e12366d8032a6d4340 0 iD8DBQBRMCYgywK+sNU5EO8RAq1/AKCWKlt9ysibyQgYwoxxIOZv5J8rpwCcDSHQaaf1fFZUTnQsOePwcM2Y/Sg=
50c922c1b5145dab8baefefb0437d363b6a6c21c 0 iD8DBQBRWnUnywK+sNU5EO8RAuQRAJwM42cJqJPeqJ0jVNdMqKMDqr4dSACeP0cRVGz1gitMuV0x8f3mrZrqc7I=
+8a7bd2dccd44ed571afe7424cd7f95594f27c092 0 iD8DBQBRXfBvywK+sNU5EO8RAn+LAKCsMmflbuXjYRxlzFwId5ptm8TZcwCdGkyLbZcASBOkzQUm/WW1qfknJHU=
--- a/.hgtags Sat Apr 06 19:50:03 2013 -0700
+++ b/.hgtags Mon Apr 08 09:44:26 2013 -0700
@@ -81,3 +81,4 @@
7511d4df752e61fe7ae4f3682e0a0008573b0402 2.5.1
5b7175377babacce80a6c1e12366d8032a6d4340 2.5.2
50c922c1b5145dab8baefefb0437d363b6a6c21c 2.5.3
+8a7bd2dccd44ed571afe7424cd7f95594f27c092 2.5.4
--- a/mercurial/sslutil.py Sat Apr 06 19:50:03 2013 -0700
+++ b/mercurial/sslutil.py Mon Apr 08 09:44:26 2013 -0700
@@ -111,9 +111,15 @@
self.ui.warn(_("warning: certificate for %s can't be verified "
"(Python too old)\n") % host)
return
+
if not sock.cipher(): # work around http://bugs.python.org/issue13721
raise util.Abort(_('%s ssl connection error') % host)
- peercert = sock.getpeercert(True)
+ try:
+ peercert = sock.getpeercert(True)
+ peercert2 = sock.getpeercert()
+ except AttributeError:
+ raise util.Abort(_('%s ssl connection error') % host)
+
if not peercert:
raise util.Abort(_('%s certificate error: '
'no certificate received') % host)
@@ -129,7 +135,7 @@
self.ui.debug('%s certificate matched fingerprint %s\n' %
(host, nicefingerprint))
elif cacerts:
- msg = _verifycert(sock.getpeercert(), host)
+ msg = _verifycert(peercert2, host)
if msg:
raise util.Abort(_('%s certificate error: %s') % (host, msg),
hint=_('configure hostfingerprint %s or use '