Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9bfbe61

Browse files
committed
Merged revisions 80557 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent c3be11a commit 9bfbe61

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_ssl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ def testDERtoPEM(self):
9595
p2 = ssl.DER_cert_to_PEM_cert(d1)
9696
d2 = ssl.PEM_cert_to_DER_cert(p2)
9797
self.assertEqual(d1, d2)
98+
if not p2.startswith(ssl.PEM_HEADER + '\n'):
99+
self.fail("DER-to-PEM didn't include correct header:\n%r\n" % p2)
100+
if not p2.endswith('\n' + ssl.PEM_FOOTER + '\n'):
101+
self.fail("DER-to-PEM didn't include correct footer:\n%r\n" % p2)
98102

99103
def test_openssl_version(self):
100104
n = ssl.OPENSSL_VERSION_NUMBER

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,7 @@ Michael Urman
788788
Hector Urtubia
789789
Andi Vajda
790790
Case Van Horsen
791+
Kyle VanderBeek
791792
Atul Varma
792793
Dmitry Vasiliev
793794
Alexandre Vassalotti

0 commit comments

Comments
 (0)