Updates for go 1.18

This commit is contained in:
9seconds
2022-03-19 14:36:04 +03:00
parent 8da55410de
commit e74726af70
29 changed files with 79 additions and 68 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ func (s ServerHello) WelcomePacket() []byte {
}
recChangeCipher.WriteBytes(buf)
hostCert := make([]byte, 1024+mrand.Intn(3092)) // nolint: gosec
hostCert := make([]byte, 1024+mrand.Intn(3092)) // nolint: gosec, gomnd
rand.Read(hostCert) // nolint: errcheck
recData := Record{
@@ -67,7 +67,7 @@ func NewServerHello(clientHello *ClientHello) *ServerHello {
copy(rv.SessionID, clientHello.SessionID)
tail := bytes.NewBuffer(CipherSuiteType_TLS_AES_128_GCM_SHA256_Bytes)
tail.WriteByte(0x00) // no compression
tail.WriteByte(0x00) // nolint: gomnd // no compression
makeTLSExtensions(tail)
rv.Tail = RawBytes(tail.Bytes())