tlsSocket.getCertificate()


返回表示本地证书的对象。返回的对象有一些与证书字段对应的属性。

¥Returns an object representing the local certificate. The returned object has some properties corresponding to the fields of the certificate.

有关证书结构的示例,请参见 tls.TLSSocket.getPeerCertificate()

¥See tls.TLSSocket.getPeerCertificate() for an example of the certificate structure.

如果没有本地证书,则将返回空对象。如果套接字被销毁,则返回 null

¥If there is no local certificate, an empty object will be returned. If the socket has been destroyed, null will be returned.