issue: server DN default value evaluation time

This commit is contained in:
Jörn-Michael Miehe 2022-04-01 16:44:28 +00:00
parent 821d72a773
commit 762af5dd48

View file

@ -252,12 +252,15 @@ class EasyRSA:
def issue( def issue(
self, self,
cert_type: CertificateType = CertificateType.client, cert_type: CertificateType = CertificateType.client,
dn: DistinguishedName = DistinguishedName.build(), dn: DistinguishedName | None = None,
) -> crypto.X509 | None: ) -> crypto.X509 | None:
""" """
Issue a client or server certificate Issue a client or server certificate
""" """
if dn is None:
dn = DistinguishedName.build()
if not (cert_type is CertificateType.client if not (cert_type is CertificateType.client
or cert_type is CertificateType.server): or cert_type is CertificateType.server):
return None return None