x509.checkIP(ip)
ip
<string>- 返回: <string> | <undefined> 如果证书匹配,则返回
ip
,如果不匹配,则返回undefined
。
检查证书是否与给定的 IP 地址(IPv4 或 IPv6)匹配。
仅考虑 RFC 5280 iPAddress
主题替代名称,它们必须与给定的 ip
地址完全匹配。
其他主题替代名称以及证书的主题字段将被忽略。
ip
<string>- Returns: <string> | <undefined> Returns
ip
if the certificate matches,undefined
if it does not.
Checks whether the certificate matches the given IP address (IPv4 or IPv6).
Only RFC 5280 iPAddress
subject alternative names are considered, and they
must match the given ip
address exactly. Other subject alternative names as
well as the subject field of the certificate are ignored.