]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/test_x509.py
Simplify GOST3410Curve initialization
[pygost.git] / pygost / test_x509.py
index c28015b5763eab0a91df2de1270b9e29b0ea0d05..a2112ad44c8d5f4b19ebfab62f4560c8cc9be01f 100644 (file)
@@ -19,8 +19,7 @@ from base64 import b64decode
 from unittest import skipIf
 from unittest import TestCase
 
-from pygost.gost3410 import CURVE_PARAMS
-from pygost.gost3410 import GOST3410Curve
+from pygost.gost3410 import CURVES
 from pygost.gost3410 import prv_unmarshal
 from pygost.gost3410 import pub_unmarshal
 from pygost.gost3410 import public_key
@@ -72,7 +71,7 @@ class TestCertificate(TestCase):
             ),
         })
         self.assertSequenceEqual(tail, b"")
-        curve = GOST3410Curve(*CURVE_PARAMS[curve_name])
+        curve = CURVES[curve_name]
         prv_key = prv_unmarshal(prv_key_raw)
         spk = cert["tbsCertificate"]["subjectPublicKeyInfo"]["subjectPublicKey"]
         self.assertIsNotNone(spk.defined)