mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
fix nats TLS unit tests (#10476)
This commit fixes the nats TLS tests by generating new certificates (root CA, server and client) - each valid for 10y. The new certificates don't have a common name (deprecated by X.509) but SANs instead. Since Go 1.15 the Go `crypto/x509` package rejects certificates that only have a common name and no SAN. See: https://golang.org/doc/go1.15#commonname
This commit is contained in:
committed by
GitHub
parent
34ea1d2167
commit
224daee391
@@ -19,7 +19,6 @@ package target
|
||||
import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
xnet "github.com/minio/minio/pkg/net"
|
||||
@@ -42,9 +41,6 @@ func TestNatsConnTLSCustomCA(t *testing.T) {
|
||||
|
||||
con, err := clientConfig.connectNats()
|
||||
if err != nil {
|
||||
if runtime.Version() == "go1.15" {
|
||||
t.Skip()
|
||||
}
|
||||
t.Errorf("Could not connect to nats: %v", err)
|
||||
}
|
||||
defer con.Close()
|
||||
@@ -68,9 +64,6 @@ func TestNatsConnTLSClientAuthorization(t *testing.T) {
|
||||
|
||||
con, err := clientConfig.connectNats()
|
||||
if err != nil {
|
||||
if runtime.Version() == "go1.15" {
|
||||
t.Skip()
|
||||
}
|
||||
t.Errorf("Could not connect to nats: %v", err)
|
||||
}
|
||||
defer con.Close()
|
||||
|
||||
Reference in New Issue
Block a user