mirror of
https://github.com/libp2p/go-openssl.git
synced 2025-01-29 05:10:10 +08:00
space monkey internal commit export
[katamari commit: b476ea016d372f9735e59c175c4b3f3b0b053ead]
This commit is contained in:
parent
fa8eb6a573
commit
b94151d9ec
10
conn.go
10
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()
|
||||
|
Loading…
Reference in New Issue
Block a user