From b94151d9ec5112012b0eb628ad3f705fe599e3c3 Mon Sep 17 00:00:00 2001 From: JT Olds Date: Fri, 28 Feb 2014 10:42:54 -0700 Subject: [PATCH] space monkey internal commit export [katamari commit: b476ea016d372f9735e59c175c4b3f3b0b053ead] --- conn.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conn.go b/conn.go index ab3cac1..f571774 100644 --- a/conn.go +++ b/conn.go @@ -245,6 +245,16 @@ func (c *Conn) PeerCertificate() (*Certificate, error) { return cert, nil } +type ConnectionState struct { + Certificate *Certificate + CertificateError error +} + +func (c *Conn) ConnectionState() (rv ConnectionState) { + rv.Certificate, rv.CertificateError = c.PeerCertificate() + return +} + func (c *Conn) shutdown() func() error { c.mtx.Lock() defer c.mtx.Unlock()