public static X509Certificate2 GenerateQlikJWTConformCert(this X509Certificate2 @this, string subjectName, string issuerName, int keyStrength = 2048) { try { return(PemCertificateHelper.GenerateSelfSignedCertificate(subjectName, issuerName, keyStrength)); } catch (Exception ex) { throw new Exception("Certificate could not be generated.", ex); } }