mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #8086: In :func:ssl.DER_cert_to_PEM_cert()
, fix missing newline
before the certificate footer. Patch by Kyle VanderBeek.
This commit is contained in:
parent
9751472001
commit
4c7bcf1194
4 changed files with 9 additions and 1 deletions
|
@ -113,6 +113,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)
|
||||
|
||||
def test_openssl_version(self):
|
||||
n = ssl.OPENSSL_VERSION_NUMBER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue