method TLSSocket.prototype.getPeerCertificate
Overload 1
#TLSSocket.prototype.getPeerCertificate(detailed: true): DetailedPeerCertificateReturns an object representing the peer's certificate. If the peer does not
provide a certificate, an empty object will be returned. If the socket has been
destroyed, null will be returned.
If the full certificate chain was requested, each certificate will include anissuerCertificate property containing an object representing its issuer's
certificate.
Parameters #
#detailed: trueInclude the full certificate chain if true, otherwise include just the peer's certificate.
Return Type #
A certificate object.
Overload 2
#TLSSocket.prototype.getPeerCertificate(detailed?: false): PeerCertificateOverload 3
#TLSSocket.prototype.getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate