mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 18:24:02 +03:00
Remove certificate server
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user