summaryrefslogtreecommitdiff
path: root/tests/test_crypto.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_crypto.py')
-rw-r--r--tests/test_crypto.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_crypto.py b/tests/test_crypto.py
index 34a9d6e..2a0c967 100644
--- a/tests/test_crypto.py
+++ b/tests/test_crypto.py
@@ -1729,6 +1729,9 @@ WpOdIpB8KksUTCzV591Nr1wd
def _extcert(self, pkey, extensions):
cert = X509()
+ # Certificates with extensions must be X.509v3, which is encoded with a
+ # version of two.
+ cert.set_version(2)
cert.set_pubkey(pkey)
cert.get_subject().commonName = "Unit Tests"
cert.get_issuer().commonName = "Unit Tests"