summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDominic Chen <d.c.ddcc@gmail.com>2015-10-13 16:32:35 +0000
committerHynek Schlawack <hs@ox.cx>2015-10-21 16:25:19 +0200
commitf05b2126876db85b7751be90d1794d3a2a6d16d0 (patch)
treea6e6635a1fee9c90238d2b13c133ae38837c2f90 /tests
parent490d60a8292d754abe61dc0827111df3bb6457f1 (diff)
downloadpyopenssl-git-f05b2126876db85b7751be90d1794d3a2a6d16d0.tar.gz
factor out function to dump crl
Diffstat (limited to 'tests')
-rw-r--r--tests/test_crypto.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_crypto.py b/tests/test_crypto.py
index 196e490..d9a9526 100644
--- a/tests/test_crypto.py
+++ b/tests/test_crypto.py
@@ -31,7 +31,7 @@ from OpenSSL.crypto import dump_certificate, load_certificate_request
from OpenSSL.crypto import dump_certificate_request, dump_privatekey
from OpenSSL.crypto import PKCS7Type, load_pkcs7_data
from OpenSSL.crypto import PKCS12, PKCS12Type, load_pkcs12
-from OpenSSL.crypto import CRL, Revoked, load_crl
+from OpenSSL.crypto import CRL, Revoked, dump_crl, load_crl
from OpenSSL.crypto import NetscapeSPKI, NetscapeSPKIType
from OpenSSL.crypto import (
sign, verify, get_elliptic_curve, get_elliptic_curves)
@@ -3206,6 +3206,14 @@ class CRLTests(TestCase):
"""
self.assertRaises(Error, load_crl, FILETYPE_PEM, b"hello, world")
+ def test_dump_crl(self):
+ """
+ The dumped CRL matches the original input.
+ """
+ crl = load_crl(FILETYPE_PEM, crlData)
+ buf = dump_crl(FILETYPE_PEM, crl)
+ assert buf == crlData
+
class X509StoreContextTests(TestCase):
"""