Skip to content

Commit 0cfc121

Browse files
committed
mark all openssl calling tests as slow
1 parent 55d7321 commit 0cfc121

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/ecdsa/test_pyecdsa.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,7 @@ def test_lengths(curve):
10021002
assert len(sig) == curve.signature_length
10031003

10041004

1005+
@pytest.mark.slow
10051006
class OpenSSL(unittest.TestCase):
10061007
# test interoperability with OpenSSL tools. Note that openssl's ECDSA
10071008
# sign/verify arguments changed between 0.9.8 and 1.0.0: the early
@@ -1046,27 +1047,31 @@ def get_openssl_messagedigest_arg(self, hash_name):
10461047
def test_from_openssl_secp112r1(self):
10471048
return self.do_test_from_openssl(SECP112r1)
10481049

1050+
@pytest.mark.slow
10491051
@pytest.mark.skipif(
10501052
"secp112r2" not in OPENSSL_SUPPORTED_CURVES,
10511053
reason="system openssl does not support secp112r2",
10521054
)
10531055
def test_from_openssl_secp112r2(self):
10541056
return self.do_test_from_openssl(SECP112r2)
10551057

1058+
@pytest.mark.slow
10561059
@pytest.mark.skipif(
10571060
"secp128r1" not in OPENSSL_SUPPORTED_CURVES,
10581061
reason="system openssl does not support secp128r1",
10591062
)
10601063
def test_from_openssl_secp128r1(self):
10611064
return self.do_test_from_openssl(SECP128r1)
10621065

1066+
@pytest.mark.slow
10631067
@pytest.mark.skipif(
10641068
"secp160r1" not in OPENSSL_SUPPORTED_CURVES,
10651069
reason="system openssl does not support secp160r1",
10661070
)
10671071
def test_from_openssl_secp160r1(self):
10681072
return self.do_test_from_openssl(SECP160r1)
10691073

1074+
@pytest.mark.slow
10701075
@pytest.mark.skipif(
10711076
"prime192v1" not in OPENSSL_SUPPORTED_CURVES,
10721077
reason="system openssl does not support prime192v1",
@@ -1194,48 +1199,55 @@ def test_from_openssl_brainpoolp384r1(self):
11941199
def test_from_openssl_brainpoolp512r1(self):
11951200
return self.do_test_from_openssl(BRAINPOOLP512r1)
11961201

1202+
@pytest.mark.slow
11971203
@pytest.mark.skipif(
11981204
"brainpoolP160t1" not in OPENSSL_SUPPORTED_CURVES,
11991205
reason="system openssl does not support brainpoolP160t1",
12001206
)
12011207
def test_from_openssl_brainpoolp160t1(self):
12021208
return self.do_test_from_openssl(BRAINPOOLP160t1)
12031209

1210+
@pytest.mark.slow
12041211
@pytest.mark.skipif(
12051212
"brainpoolP192t1" not in OPENSSL_SUPPORTED_CURVES,
12061213
reason="system openssl does not support brainpoolP192t1",
12071214
)
12081215
def test_from_openssl_brainpoolp192t1(self):
12091216
return self.do_test_from_openssl(BRAINPOOLP192t1)
12101217

1218+
@pytest.mark.slow
12111219
@pytest.mark.skipif(
12121220
"brainpoolP224t1" not in OPENSSL_SUPPORTED_CURVES,
12131221
reason="system openssl does not support brainpoolP224t1",
12141222
)
12151223
def test_from_openssl_brainpoolp224t1(self):
12161224
return self.do_test_from_openssl(BRAINPOOLP224t1)
12171225

1226+
@pytest.mark.slow
12181227
@pytest.mark.skipif(
12191228
"brainpoolP256t1" not in OPENSSL_SUPPORTED_CURVES,
12201229
reason="system openssl does not support brainpoolP256t1",
12211230
)
12221231
def test_from_openssl_brainpoolp256t1(self):
12231232
return self.do_test_from_openssl(BRAINPOOLP256t1)
12241233

1234+
@pytest.mark.slow
12251235
@pytest.mark.skipif(
12261236
"brainpoolP320t1" not in OPENSSL_SUPPORTED_CURVES,
12271237
reason="system openssl does not support brainpoolP320t1",
12281238
)
12291239
def test_from_openssl_brainpoolp320t1(self):
12301240
return self.do_test_from_openssl(BRAINPOOLP320t1)
12311241

1242+
@pytest.mark.slow
12321243
@pytest.mark.skipif(
12331244
"brainpoolP384t1" not in OPENSSL_SUPPORTED_CURVES,
12341245
reason="system openssl does not support brainpoolP384t1",
12351246
)
12361247
def test_from_openssl_brainpoolp384t1(self):
12371248
return self.do_test_from_openssl(BRAINPOOLP384t1)
12381249

1250+
@pytest.mark.slow
12391251
@pytest.mark.skipif(
12401252
"brainpoolP512t1" not in OPENSSL_SUPPORTED_CURVES,
12411253
reason="system openssl does not support brainpoolP512t1",
@@ -1303,27 +1315,31 @@ def do_test_from_openssl(self, curve, hash_name="SHA1"):
13031315
def test_to_openssl_secp112r1(self):
13041316
self.do_test_to_openssl(SECP112r1)
13051317

1318+
@pytest.mark.slow
13061319
@pytest.mark.skipif(
13071320
"secp112r2" not in OPENSSL_SUPPORTED_CURVES,
13081321
reason="system openssl does not support secp112r2",
13091322
)
13101323
def test_to_openssl_secp112r2(self):
13111324
self.do_test_to_openssl(SECP112r2)
13121325

1326+
@pytest.mark.slow
13131327
@pytest.mark.skipif(
13141328
"secp128r1" not in OPENSSL_SUPPORTED_CURVES,
13151329
reason="system openssl does not support secp128r1",
13161330
)
13171331
def test_to_openssl_secp128r1(self):
13181332
self.do_test_to_openssl(SECP128r1)
13191333

1334+
@pytest.mark.slow
13201335
@pytest.mark.skipif(
13211336
"secp160r1" not in OPENSSL_SUPPORTED_CURVES,
13221337
reason="system openssl does not support secp160r1",
13231338
)
13241339
def test_to_openssl_secp160r1(self):
13251340
self.do_test_to_openssl(SECP160r1)
13261341

1342+
@pytest.mark.slow
13271343
@pytest.mark.skipif(
13281344
"prime192v1" not in OPENSSL_SUPPORTED_CURVES,
13291345
reason="system openssl does not support prime192v1",
@@ -1451,48 +1467,55 @@ def test_to_openssl_brainpoolp384r1(self):
14511467
def test_to_openssl_brainpoolp512r1(self):
14521468
self.do_test_to_openssl(BRAINPOOLP512r1)
14531469

1470+
@pytest.mark.slow
14541471
@pytest.mark.skipif(
14551472
"brainpoolP160t1" not in OPENSSL_SUPPORTED_CURVES,
14561473
reason="system openssl does not support brainpoolP160t1",
14571474
)
14581475
def test_to_openssl_brainpoolp160t1(self):
14591476
self.do_test_to_openssl(BRAINPOOLP160t1)
14601477

1478+
@pytest.mark.slow
14611479
@pytest.mark.skipif(
14621480
"brainpoolP192t1" not in OPENSSL_SUPPORTED_CURVES,
14631481
reason="system openssl does not support brainpoolP192t1",
14641482
)
14651483
def test_to_openssl_brainpoolp192t1(self):
14661484
self.do_test_to_openssl(BRAINPOOLP192t1)
14671485

1486+
@pytest.mark.slow
14681487
@pytest.mark.skipif(
14691488
"brainpoolP224t1" not in OPENSSL_SUPPORTED_CURVES,
14701489
reason="system openssl does not support brainpoolP224t1",
14711490
)
14721491
def test_to_openssl_brainpoolp224t1(self):
14731492
self.do_test_to_openssl(BRAINPOOLP224t1)
14741493

1494+
@pytest.mark.slow
14751495
@pytest.mark.skipif(
14761496
"brainpoolP256t1" not in OPENSSL_SUPPORTED_CURVES,
14771497
reason="system openssl does not support brainpoolP256t1",
14781498
)
14791499
def test_to_openssl_brainpoolp256t1(self):
14801500
self.do_test_to_openssl(BRAINPOOLP256t1)
14811501

1502+
@pytest.mark.slow
14821503
@pytest.mark.skipif(
14831504
"brainpoolP320t1" not in OPENSSL_SUPPORTED_CURVES,
14841505
reason="system openssl does not support brainpoolP320t1",
14851506
)
14861507
def test_to_openssl_brainpoolp320t1(self):
14871508
self.do_test_to_openssl(BRAINPOOLP320t1)
14881509

1510+
@pytest.mark.slow
14891511
@pytest.mark.skipif(
14901512
"brainpoolP384t1" not in OPENSSL_SUPPORTED_CURVES,
14911513
reason="system openssl does not support brainpoolP384t1",
14921514
)
14931515
def test_to_openssl_brainpoolp384t1(self):
14941516
self.do_test_to_openssl(BRAINPOOLP384t1)
14951517

1518+
@pytest.mark.slow
14961519
@pytest.mark.skipif(
14971520
"brainpoolP512t1" not in OPENSSL_SUPPORTED_CURVES,
14981521
reason="system openssl does not support brainpoolP512t1",
@@ -1633,13 +1656,15 @@ def do_eddsa_test_to_openssl(self, curve):
16331656

16341657
# in practice at least OpenSSL 3.0.0 is needed to make EdDSA signatures
16351658
# earlier versions support EdDSA only in X.509 certificates
1659+
@pytest.mark.slow
16361660
@pytest.mark.skipif(
16371661
"ed25519" not in OPENSSL_SUPPORTED_TYPES,
16381662
reason="system openssl does not support signing with Ed25519",
16391663
)
16401664
def test_to_openssl_ed25519(self):
16411665
return self.do_eddsa_test_to_openssl(Ed25519)
16421666

1667+
@pytest.mark.slow
16431668
@pytest.mark.skipif(
16441669
"ed448" not in OPENSSL_SUPPORTED_TYPES,
16451670
reason="system openssl does not support signing with Ed448",
@@ -1683,13 +1708,15 @@ def do_eddsa_test_from_openssl(self, curve):
16831708

16841709
shutil.rmtree("t")
16851710

1711+
@pytest.mark.slow
16861712
@pytest.mark.skipif(
16871713
"ed25519" not in OPENSSL_SUPPORTED_TYPES,
16881714
reason="system openssl does not support signing with Ed25519",
16891715
)
16901716
def test_from_openssl_ed25519(self):
16911717
return self.do_eddsa_test_from_openssl(Ed25519)
16921718

1719+
@pytest.mark.slow
16931720
@pytest.mark.skipif(
16941721
"ed448" not in OPENSSL_SUPPORTED_TYPES,
16951722
reason="system openssl does not support signing with Ed448",

0 commit comments

Comments
 (0)