Skip to content

Commit

Permalink
Update Go to 1.16.7
Browse files Browse the repository at this point in the history
Update Go to 1.16.7.
Go 1.16 changes also required one test update.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
  • Loading branch information
denyeart committed Aug 27, 2021
1 parent 7026aee commit 073587e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PKGNAME = github.com/hyperledger/$(PROJECT_NAME)

METADATA_VAR = Version=$(PROJECT_VERSION)

GO_VER = 1.15.7
GO_VER = 1.16.7
GO_SOURCE := $(shell find . -name '*.go')
GO_LDFLAGS = $(patsubst %,-X $(PKGNAME)/lib/metadata.%,$(METADATA_VAR))
export GO_LDFLAGS
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ See [User's Guide for Fabric CA](https://hyperledger-fabric-ca.readthedocs.io) f

## Prerequisites

* Go 1.15+ installation or later
* Go 1.16+ installation or later
* **GOPATH** environment variable is set correctly
* docker version 17.03 or later
* docker-compose version 1.11 or later
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variables:
- name: GOPATH
value: $(Agent.BuildDirectory)/go
- name: GOVER
value: 1.15.7
value: 1.16.7

stages:
- stage: BuildBinaries
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pr:
variables:
GOPATH: $(Agent.BuildDirectory)/go
PATH: $(Agent.BuildDirectory)/go/bin:$(Agent.BuildDirectory)/go/src/github.com/hyperledger/fabric-ca/build/tools:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
GOVER: 1.15.7
GOVER: 1.16.7

jobs:
- job: VerifyBuild
Expand Down
12 changes: 10 additions & 2 deletions lib/server/operations/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ var _ = Describe("TLS", func() {

tlsConfig, err := opsTLS.Config()
Expect(err).NotTo(HaveOccurred())
Expect(tlsConfig).To(Equal(&tls.Config{

expectedConfig := &tls.Config{
Certificates: []tls.Certificate{cert},
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
Expand All @@ -72,7 +73,14 @@ var _ = Describe("TLS", func() {
},
ClientCAs: clientCAPool,
ClientAuth: tls.RequireAndVerifyClientCert,
}))
}

// Can't compare entire tlsConfig due to new CertPool struct (ClientCAs) in Go 1.16 and above
// Compare ClientCAs.Subjects() instead
Expect(tlsConfig.Certificates).To(Equal(expectedConfig.Certificates))
Expect(tlsConfig.CipherSuites).To(Equal(expectedConfig.CipherSuites))
Expect(tlsConfig.ClientAuth).To(Equal(expectedConfig.ClientAuth))
Expect(tlsConfig.ClientCAs.Subjects()).To(Equal(expectedConfig.ClientCAs.Subjects()))
})

Context("when TLS is not enabled", func() {
Expand Down

0 comments on commit 073587e

Please sign in to comment.