method X509Certificate.prototype.checkEmail
#X509Certificate.prototype.checkEmail(email: string,options?: Pick<X509CheckOptions, "subject">,): string | undefinedChecks whether the certificate matches the given email address.
If the 'subject' option is undefined or set to 'default', the certificate
subject is only considered if the subject alternative name extension either does
not exist or does not contain any email addresses.
If the 'subject' option is set to 'always' and if the subject alternative
name extension either does not exist or does not contain a matching email
address, the certificate subject is considered.
If the 'subject' option is set to 'never', the certificate subject is never
considered, even if the certificate contains no subject alternative names.
Parameters #
#email: string #options: Pick<X509CheckOptions, "subject"> optional
Return Type #
string | undefined Returns email if the certificate matches, undefined if it does not.