Fix: San values #2921

Not sure is it correct solution
This commit is contained in:
e11it 2020-03-03 21:45:33 +03:00 committed by GitHub
parent 462099d906
commit 27a86f5c18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,7 +146,9 @@ class CertificateInputSchema(CertificateCreationSchema):
data["extensions"]["subAltNames"] = {"names": []}
elif not data["extensions"]["subAltNames"].get("names"):
data["extensions"]["subAltNames"]["names"] = []
data["extensions"]["subAltNames"]["names"] += csr_sans
if not data["extensions"]["subAltNames"]["names"]:
data["extensions"]["subAltNames"]["names"] += csr_sans
return missing.convert_validity_years(data)