|
26 | 26 | from .util import number_to_string, encoded_oid_ecPublicKey, MalformedSignature |
27 | 27 | from .curves import Curve, UnknownCurveError |
28 | 28 | from .curves import ( |
| 29 | + SECP112r1, |
29 | 30 | NIST192p, |
30 | 31 | NIST224p, |
31 | 32 | NIST256p, |
@@ -866,6 +867,13 @@ def get_openssl_messagedigest_arg(self, hash_name): |
866 | 867 | # vk: 3:OpenSSL->python 4:python->OpenSSL |
867 | 868 | # sig: 5:OpenSSL->python 6:python->OpenSSL |
868 | 869 |
|
| 870 | + @pytest.mark.skipif( |
| 871 | + "secp112r1" not in OPENSSL_SUPPORTED_CURVES, |
| 872 | + reason="system openssl does not support secp112r1", |
| 873 | + ) |
| 874 | + def test_from_openssl_secp112r1(self): |
| 875 | + return self.do_test_from_openssl(SECP112r1) |
| 876 | + |
869 | 877 | @pytest.mark.skipif( |
870 | 878 | "prime192v1" not in OPENSSL_SUPPORTED_CURVES, |
871 | 879 | reason="system openssl does not support prime192v1", |
@@ -1030,6 +1038,13 @@ def do_test_from_openssl(self, curve, hash_name="SHA1"): |
1030 | 1038 | sk_from_p8 = SigningKey.from_pem(privkey_p8_pem) |
1031 | 1039 | self.assertEqual(sk, sk_from_p8) |
1032 | 1040 |
|
| 1041 | + @pytest.mark.skipif( |
| 1042 | + "secp112r1" not in OPENSSL_SUPPORTED_CURVES, |
| 1043 | + reason="system openssl does not support secp112r1", |
| 1044 | + ) |
| 1045 | + def test_to_openssl_secp112r1(self): |
| 1046 | + self.do_test_to_openssl(SECP112r1) |
| 1047 | + |
1033 | 1048 | @pytest.mark.skipif( |
1034 | 1049 | "prime192v1" not in OPENSSL_SUPPORTED_CURVES, |
1035 | 1050 | reason="system openssl does not support prime192v1", |
|
0 commit comments