Remove certificate server

This commit is contained in:
9seconds
2019-11-12 16:13:05 +03:00
parent 8e0436e89a
commit 5d3824704c
6 changed files with 8 additions and 152 deletions
+5 -1
View File
@@ -6,6 +6,7 @@ import (
"crypto/rand"
"crypto/sha256"
"io"
mrand "math/rand"
"golang.org/x/crypto/curve25519"
@@ -18,7 +19,7 @@ type ServerHello struct {
clientHello *ClientHello
}
func (s ServerHello) WelcomePacket(hostCert []byte) []byte {
func (s ServerHello) WelcomePacket() []byte {
s.Random = [32]byte{}
rec := Record{
Type: RecordTypeHandshake,
@@ -34,6 +35,9 @@ func (s ServerHello) WelcomePacket(hostCert []byte) []byte {
}
buf.Write(recChangeCipher.Bytes())
hostCert := make([]byte, 1024+mrand.Intn(3092))
rand.Read(hostCert) // nolint: errcheck
recData := Record{
Type: RecordTypeApplicationData,
Version: Version12,