node.js tls 模块完成的相互身份验证检查是什么?

What are the mutual auth checks done by node.js tls module?

我从 here

的参考手册中复制了文本

Verifies the certificate cert is issued to hostname

This function can be overwritten by providing alternative function as part of the options.checkServerIdentity option passed to tls.connect(). The overwriting function can call tls.checkServerIdentity() of course, to augment the checks done with additional verification.

所以,我的问题是 tls.checkServerIdentity() 中进行了哪些检查来验证证书?它是否包括请求中存在的主机的 DNS 解析?我正在做一个相互认证 tls,如果在 tls.checkServerIdentity()

中还没有完成,我想做主机的 dns 解析

我通过查看checkServerIdentity的源代码找到了答案here

它检查证书的 SAN 和 CN 字段以查看主机名的匹配项。