From ea17b0c2255db074941b16938f654029b12abd46 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Fri, 4 Nov 2016 17:09:45 -0700 Subject: [PATCH] tris: implement Committer --- handshake_server.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/handshake_server.go b/handshake_server.go index 6d120a9..a8e58d3 100644 --- a/handshake_server.go +++ b/handshake_server.go @@ -16,6 +16,10 @@ import ( "io" ) +type Committer interface { + Commit() error +} + // serverHandshakeState contains details of a server handshake in progress. // It's discarded once the handshake has completed. type serverHandshakeState struct { @@ -268,6 +272,13 @@ Curves: hs.hello.scts = hs.cert.SignedCertificateTimestamps } + if committer, ok := c.conn.(Committer); ok { + err = committer.Commit() + if err != nil { + return false, err + } + } + if priv, ok := hs.cert.PrivateKey.(crypto.Signer); ok { switch priv.Public().(type) { case *ecdsa.PublicKey: