[Python-checkins] r80558 - in python/branches/release26-maint: Lib/ssl.py Lib/test/test_ssl.py Misc/ACKS Misc/NEWS
antoine.pitrou
python-checkins at python.org
Wed Apr 28 00:05:18 CEST 2010
Author: antoine.pitrou
Date: Wed Apr 28 00:05:18 2010
New Revision: 80558
Log:
Merged revisions 80557 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80557 | antoine.pitrou | 2010-04-28 00:03:37 +0200 (mer., 28 avril 2010) | 4 lines
Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline
before the certificate footer. Patch by Kyle VanderBeek.
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Lib/ssl.py
python/branches/release26-maint/Lib/test/test_ssl.py
python/branches/release26-maint/Misc/ACKS
python/branches/release26-maint/Misc/NEWS
Modified: python/branches/release26-maint/Lib/ssl.py
==============================================================================
--- python/branches/release26-maint/Lib/ssl.py (original)
+++ python/branches/release26-maint/Lib/ssl.py Wed Apr 28 00:05:18 2010
@@ -361,7 +361,7 @@
# preferred because older API gets line-length wrong
f = base64.standard_b64encode(der_cert_bytes)
return (PEM_HEADER + '\n' +
- textwrap.fill(f, 64) +
+ textwrap.fill(f, 64) + '\n' +
PEM_FOOTER + '\n')
else:
return (PEM_HEADER + '\n' +
Modified: python/branches/release26-maint/Lib/test/test_ssl.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_ssl.py (original)
+++ python/branches/release26-maint/Lib/test/test_ssl.py Wed Apr 28 00:05:18 2010
@@ -116,6 +116,10 @@
p2 = ssl.DER_cert_to_PEM_cert(d1)
d2 = ssl.PEM_cert_to_DER_cert(p2)
self.assertEqual(d1, d2)
+ if not p2.startswith(ssl.PEM_HEADER + '\n'):
+ self.fail("DER-to-PEM didn't include correct header:\n%r\n" % p2)
+ if not p2.endswith('\n' + ssl.PEM_FOOTER + '\n'):
+ self.fail("DER-to-PEM didn't include correct footer:\n%r\n" % p2)
def test_refcycle(self):
# Issue #7943: an SSL object doesn't create reference cycles with
Modified: python/branches/release26-maint/Misc/ACKS
==============================================================================
--- python/branches/release26-maint/Misc/ACKS (original)
+++ python/branches/release26-maint/Misc/ACKS Wed Apr 28 00:05:18 2010
@@ -734,6 +734,7 @@
Roger Upole
Michael Urman
Hector Urtubia
+Kyle VanderBeek
Atul Varma
Dmitry Vasiliev
Alexandre Vassalotti
Modified: python/branches/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS (original)
+++ python/branches/release26-maint/Misc/NEWS Wed Apr 28 00:05:18 2010
@@ -33,6 +33,9 @@
Library
-------
+- Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline
+ before the certificate footer. Patch by Kyle VanderBeek.
+
- Issue #8549: Fix compiling the _ssl extension under AIX. Patch by
Sridhar Ratnakumar.
More information about the Python-checkins
mailing list