x509.checkEmail(email[, options])
email
<string>options
<Object>subject
<string>'default'
、'always'
或'never'
。 默认值:'default'
。
- 返回: <string> | <undefined> 如果证书匹配,则返回
email
,如果不匹配,则返回undefined
。
检查证书是否与给定的电子邮件地址匹配。
如果 'subject'
选项未定义或设置为 'default'
,则仅当主题备用名称扩展不存在或不包含任何电子邮件地址时才考虑证书主题。
如果 'subject'
选项设置为 'always'
,并且如果主题备用名称扩展不存在或不包含匹配的电子邮件地址,则考虑证书主题。
如果 'subject'
选项设置为 'never'
,则从不考虑证书主题,即使证书不包含主题替代名称。
email
<string>options
<Object>subject
<string>'default'
,'always'
, or'never'
. Default:'default'
.
- Returns: <string> | <undefined> Returns
email
if the certificate matches,undefined
if it does not.
Checks 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.