x509.checkEmail(email[, options])
email<string>options<Object>- 返回值:<string> | <undefined> 如果证书匹配,则返回
email;如果不匹配,则返回undefined。
检查证书是否与给定的电子邮件地址匹配。
【Checks whether the certificate matches the given email address.】
如果将 'subject' 选项设置为 'always',并且主题备用名称扩展不存在或不包含匹配的电子邮件地址,则会考虑证书主题。
【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.】
如果将 'subject' 选项设置为 'default',则只有在主题备用名称扩展不存在或不包含任何电子邮件地址时,才会考虑证书主题。
【If the 'subject' option is 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.】
如果将 'subject' 选项设置为 'never',则不会考虑证书主题,即使证书不包含任何主题备用名称。
【If the 'subject' option is set to 'never', the certificate subject is never
considered, even if the certificate contains no subject alternative names.】