go 1.11: Switch to GO 1.11
Minimal amount of changes needed to switch to GO 1.11 * crypto/internal/cipherhw was removed and internal/cpu was introduced * wrong code formatting in handhsake_server_test.go was breaking the build
This commit is contained in:
parent
8da51abeca
commit
86b0aecf5e
@ -5,7 +5,7 @@ services:
|
||||
- docker
|
||||
|
||||
go:
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
|
||||
env:
|
||||
- TEST_SUITE=test-unit
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM golang:1.10-alpine
|
||||
FROM golang:1.11-alpine
|
||||
|
||||
RUN apk add --update \
|
||||
git \
|
||||
|
16
common.go
16
common.go
@ -7,12 +7,12 @@ package tls
|
||||
import (
|
||||
"container/list"
|
||||
"crypto"
|
||||
"crypto/internal/cipherhw"
|
||||
"crypto/rand"
|
||||
"crypto/sha512"
|
||||
"crypto/x509"
|
||||
"errors"
|
||||
"fmt"
|
||||
"internal/cpu"
|
||||
"io"
|
||||
"math/big"
|
||||
"net"
|
||||
@ -1127,7 +1127,19 @@ func defaultTLS13CipherSuites() []uint16 {
|
||||
|
||||
func initDefaultCipherSuites() {
|
||||
var topCipherSuites, topTLS13CipherSuites []uint16
|
||||
if cipherhw.AESGCMSupport() {
|
||||
|
||||
// Check the cpu flags for each platform that has optimized GCM implementations.
|
||||
// Worst case, these variables will just all be false
|
||||
hasGCMAsmAMD64 := cpu.X86.HasAES && cpu.X86.HasPCLMULQDQ
|
||||
|
||||
hasGCMAsmARM64 := cpu.ARM64.HasAES && cpu.ARM64.HasPMULL
|
||||
|
||||
// Keep in sync with crypto/aes/cipher_s390x.go.
|
||||
hasGCMAsmS390X := cpu.S390X.HasAES && cpu.S390X.HasAESCBC && cpu.S390X.HasAESCTR && (cpu.S390X.HasGHASH || cpu.S390X.HasAESGCM)
|
||||
|
||||
hasGCMAsm := hasGCMAsmAMD64 || hasGCMAsmARM64 || hasGCMAsmS390X
|
||||
|
||||
if hasGCMAsm {
|
||||
// If AES-GCM hardware is provided then prioritise AES-GCM
|
||||
// cipher suites.
|
||||
topTLS13CipherSuites = []uint16{
|
||||
|
Loading…
Reference in New Issue
Block a user