title: Get remote ssl certificate in golang
body: <p>I want to receive a TCP connection over TLS. I want to validate client certificate and use it to authenticate the client to my application.
  Go has the standard <a href="https://golang.org/pkg/crypto/tls/" rel="noreferrer"><code>crypto/tls</code></a> package. It can validate client/server certificates. But I can't find way to get details of the remote (client) certificate, like the common name.</p>