async function createSelfSignedCertificate({
    privateKey,
    notAfter,
    notBefore,
    validity,