]> Cypherpunks.ru repositories - pyderasn.git/blobdiff - tests/test_cms.py
Simple performance optimizations
[pyderasn.git] / tests / test_cms.py
index 86756f49924d41f01f4b1d9e3b053c57e7947ed7..faa52ab4aac0a0d11695c04e3c9d3bf4e0e883ee 100644 (file)
@@ -1,5 +1,5 @@
 # coding: utf-8
-# PyDERASN -- Python ASN.1 DER codec with abstract structures
+# PyDERASN -- Python ASN.1 DER/CER/BER codec with abstract structures
 # Copyright (C) 2017-2020 Sergey Matveev <stargrave@stargrave.org>
 #
 # This program is free software: you can redistribute it and/or modify
@@ -277,7 +277,7 @@ class TestSignedDataCERWithOpenSSL(TestCase):
         ))
         cms_path = self.tmpfile()
         with io_open(cms_path, "wb") as fd:
-            ci.encode_cer(writer=fd.write)
+            ci.encode_cer(fd.write)
         self.verify(cert_path, cms_path)
         fd = open(cms_path, "rb")
         raw = memoryview(fd.read()) if PY2 else file_mmaped(fd)
@@ -321,7 +321,7 @@ class TestSignedDataCERWithOpenSSL(TestCase):
         ))
         eci_path = self.tmpfile()
         with open(eci_path, "wb") as fd:
-            OctetString(eci["eContent"]).encode_cer(writer=fd.write)
+            OctetString(eci["eContent"]).encode_cer(fd.write)
         print("ECI file written", time() - start)
         eci_fd = open(eci_path, "rb")
         eci_raw = file_mmaped(eci_fd)
@@ -373,6 +373,6 @@ class TestSignedDataCERWithOpenSSL(TestCase):
         ))
         cms_path = self.tmpfile()
         with io_open(cms_path, "wb") as fd:
-            ci.encode_cer(writer=fd.write)
+            ci.encode_cer(fd.write)
         print("CMS written", time() - start)
         self.verify(cert_path, cms_path)