tlsSocket.getPeerCertificate([ detailed ])
Returns an object representing the peer's certificate. The returned object has some properties corresponding to the fields of the certificate. If the detailed argument is true the full chain with the issuer property will be returned, if false only the top certificate without the issuer property.
Example:
{ subject:
{ C: 'UK',
ST: 'Acknack Ltd',
L: 'Rhys Jones',
O: 'node.js',
OU: 'Test TLS Certificate',
CN: 'localhost' },