summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-04-27 22:09:05 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-04-27 22:09:05 (GMT)
commit00f905e8f244ab0f5216d82a4b3ae476fffdd768 (patch)
treed8ff8be3c46d52436398ac03f2a42ad172f954bd /Lib
parent79ac78afeff25cd277f4271f8605f29f30fbbdf8 (diff)
downloadcpython-00f905e8f244ab0f5216d82a4b3ae476fffdd768.zip
cpython-00f905e8f244ab0f5216d82a4b3ae476fffdd768.tar.gz
cpython-00f905e8f244ab0f5216d82a4b3ae476fffdd768.tar.bz2
Merged revisions 80559 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80559 | antoine.pitrou | 2010-04-28 00:08:08 +0200 (mer., 28 avril 2010) | 12 lines Merged revisions 80557 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk (the bug was already fixed in py3k, just merging in the tests) ........ 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. ........ ................
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ssl.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index da30c44..042d179 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -98,6 +98,10 @@ class BasicTests(unittest.TestCase):
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)
@support.cpython_only
def test_refcycle(self):