method TLSSocket.prototype.getPeerCertificate
Usage in Deno
import { TLSSocket } from "node:tls";
TLSSocket.prototype.getPeerCertificate(detailed: true): DetailedPeerCertificate
Returns 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.
A certificate object.
TLSSocket.prototype.getPeerCertificate(detailed?: false): PeerCertificate
TLSSocket.prototype.getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate