Skip to content

Commit a35ba70

Browse files
committed
fixes ec test
1 parent d223bf4 commit a35ba70

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

tests/test_vaas.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,11 @@ def test_enroll_ec_key_certificate(self):
175175
zone = self.vaas_zone_ec
176176

177177
password = 'FooBarPass123'
178+
random_name = f"{random_word(10)}.vfidev.com"
178179

179180
request = CertificateRequest(
180-
common_name=f"{random_word(10)}.vfidev.com",
181+
common_name=random_name,
182+
san_dns=[random_name],
181183
key_type=KeyType(
182184
key_type="ec",
183185
option="P384"

vcert/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def get_ip_address():
109109

110110
class KeyType:
111111
ALLOWED_SIZES = [2048, 3072, 4096, 8192]
112-
ALLOWED_CURVES = ["p256", "p384", "p521"]
112+
ALLOWED_CURVES = ["p256", "p384", "p521", "ed25519"]
113113
RSA = 'rsa'
114114
ECDSA = 'ec'
115115

@@ -125,7 +125,7 @@ def __init__(self, key_type, option):
125125
raise BadData
126126
elif self.key_type == KeyType.ECDSA:
127127
option = {"secp521r1": "p521", "secp384r1": "p384", "secp256r1": "p256", "p256": "p256", "p384": "p384",
128-
"p521": "p521"}[option.lower().strip()]
128+
"p521": "p521", "ed25519": "ed25519"}[option.lower().strip()]
129129
if option not in KeyType.ALLOWED_CURVES:
130130
log.error(f"unknown curve: {option}, should be one of {KeyType.ALLOWED_CURVES}")
131131
raise BadData

0 commit comments

Comments
 (0)