diff -r d620ce23ebe4 src/pkg/crypto/tls/handshake_client.go --- a/src/pkg/crypto/tls/handshake_client.go Thu Jan 05 12:05:38 2012 -0500 +++ b/src/pkg/crypto/tls/handshake_client.go Fri Mar 16 23:24:16 2012 -0700 @@ -237,12 +237,12 @@ } finishedHash.Write(shd.marshal()) + certMsg = new(certificateMsg) if certToSend != nil { - certMsg = new(certificateMsg) certMsg.certificates = certToSend.Certificate - finishedHash.Write(certMsg.marshal()) - c.writeRecord(recordTypeHandshake, certMsg.marshal()) - } + } + finishedHash.Write(certMsg.marshal()) + c.writeRecord(recordTypeHandshake, certMsg.marshal()) preMasterSecret, ckx, err := keyAgreement.generateClientKeyExchange(c.config, hello, certs[0]) if err != nil {