diff --git a/api/kiwi_vpn_api/easyrsa.py b/api/kiwi_vpn_api/easyrsa.py index 3f464c2..0b79386 100644 --- a/api/kiwi_vpn_api/easyrsa.py +++ b/api/kiwi_vpn_api/easyrsa.py @@ -252,12 +252,15 @@ class EasyRSA: def issue( self, cert_type: CertificateType = CertificateType.client, - dn: DistinguishedName = DistinguishedName.build(), + dn: DistinguishedName | None = None, ) -> crypto.X509 | None: """ Issue a client or server certificate """ + if dn is None: + dn = DistinguishedName.build() + if not (cert_type is CertificateType.client or cert_type is CertificateType.server): return None