1 From 12e7408bdf77d2a5af3a93c175d7ebd364b9e22d Mon Sep 17 00:00:00 2001
2 From: Jonas Witschel <diabonas@archlinux.org>
3 Date: Sat, 17 Oct 2020 17:16:37 +0200
4 Subject: [PATCH] tests: mark test_sign_eddsa and test_self_sign_certificate as
7 These two tests consistently fail with the following output:
9 ======================================================================
10 ERROR: test_sign_eddsa (tests.test_ecc.ECCTests)
11 ----------------------------------------------------------------------
12 Traceback (most recent call last):
13 File "/build/python-pkcs11/src/python-pkcs11-0.7.0/tests/__init__.py", line 95, in wrapper
14 return func(self, *args, **kwargs)
15 File "/build/python-pkcs11/src/python-pkcs11-0.7.0/tests/test_ecc.py", line 158, in test_sign_eddsa
16 pub, priv = parameters.generate_keypair()
17 File "pkcs11/_pkcs11.pyx", line 855, in pkcs11._pkcs11.DomainParameters.generate_keypair
18 assertRV(_funclist.C_GenerateKeyPair(handle, mech_data,
19 File "pkcs11/_errors.pyx", line 88, in pkcs11._pkcs11.assertRV
20 raise ERROR_MAP.get(rv,
21 pkcs11.exceptions.GeneralError
23 ======================================================================
24 FAIL: test_self_sign_certificate (tests.test_x509.X509Tests)
25 ----------------------------------------------------------------------
26 Traceback (most recent call last):
27 File "/build/python-pkcs11/src/python-pkcs11-0.7.0/tests/__init__.py", line 95, in wrapper
28 return func(self, *args, **kwargs)
29 File "/build/python-pkcs11/src/python-pkcs11-0.7.0/tests/test_x509.py", line 222, in test_self_sign_certificate
30 self.assertEqual(proc.wait(), 0)
31 AssertionError: 2 != 0
33 ----------------------------------------------------------------------
36 https://github.com/danni/python-pkcs11/issues/63#issuecomment-526812900
37 these failures are due to the OpenSSL and PKCS11_MODULE configuration and
38 therefore not indicative of an issue with the Python module itself.
40 tests/test_ecc.py | 3 +++
41 tests/test_x509.py | 3 +++
42 2 files changed, 6 insertions(+)
44 diff --git a/tests/test_ecc.py b/tests/test_ecc.py
45 index 30f685b..03ff592 100644
46 --- a/tests/test_ecc.py
47 +++ b/tests/test_ecc.py
49 PKCS#11 Elliptic Curve Cryptography.
57 @@ -148,6 +150,7 @@ class ECCTests(TestCase):
58 mechanism=Mechanism.ECDSA))
60 @requires(Mechanism.EC_EDWARDS_KEY_PAIR_GEN, Mechanism.EDDSA)
61 + @unittest.expectedFailure
62 def test_sign_eddsa(self):
63 parameters = self.session.create_domain_parameters(KeyType.EC, {
64 # use "Ed25519" once https://github.com/wbond/asn1crypto/pull/134
65 diff --git a/tests/test_x509.py b/tests/test_x509.py
66 index 796ae45..6f9c1da 100644
67 --- a/tests/test_x509.py
68 +++ b/tests/test_x509.py
70 X.509 Certificate Tests
78 @@ -165,6 +167,7 @@ class X509Tests(TestCase):
81 @requires(Mechanism.RSA_PKCS_KEY_PAIR_GEN, Mechanism.SHA1_RSA_PKCS)
82 + @unittest.expectedFailure
83 def test_self_sign_certificate(self):
84 # Warning: proof of concept code only!
85 pub, priv = self.session.generate_keypair(KeyType.RSA, 1024)