x509.checkEmail(email[, options])
email<string>options<Object>subject<string>'default'、'always'或'never'。 默认值:'default'。
- 返回:<string> | <undefined> 如果证书匹配,则返回
email;如果不匹配,则返回undefined。
检查证书是否与给定的电子邮件地址匹配。
🌐 Checks whether the certificate matches the given email address.
如果 'subject' 选项未定义或设置为 'default',证书主题将按照 OpenSSL 的默认行为来考虑。
🌐 If the 'subject' option is undefined or set to 'default', the certificate
subject is considered according to OpenSSL's default behavior.
如果将 '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' 选项设置为 'never',则不会考虑证书主题,即使证书不包含任何主题备用名称。
🌐 If the 'subject' option is set to 'never', the certificate subject is never
considered, even if the certificate contains no subject alternative names.