async def METHOD_NAME():
    subject_alt_names: List[x509.GeneralName] = [x509.UniformResourceIdentifier(f"urn:{HOSTNAME}:foobar:myselfsignedserver"),
                                                 x509.DNSName(f"{HOSTNAME}")]
    # key: RSAPrivateKey = generate_private_key()
    key = await load_private_key(base_private / "myserver.pem")
    cert: x509.Certificate = generate_self_signed_app_certificate(key,
                                                                  f"myselfsignedserver@{HOSTNAME}",
                                                                  NAMES,
                                                                  subject_alt_names,
                                                                  extended=CLIENT_SERVER_USE)
    cert_file = base_certs / "myserver-selfsigned.der"
    cert_file.write_bytes(cert.public_bytes(encoding=Encoding.DER))