forked from quic-go/quic-go
Fix reading of tls.Config certificates
This commit mostly copies the getCertificate function from crypto/tls to align our certificate reading with the standard library. Should fix #458.
This commit is contained in:
@@ -84,6 +84,7 @@ var _ = Describe("Proof", func() {
|
||||
})
|
||||
|
||||
It("uses NameToCertificate entries", func() {
|
||||
config.Certificates = []tls.Certificate{cert, cert} // two entries so the long path is used
|
||||
config.NameToCertificate = map[string]*tls.Certificate{
|
||||
"quic.clemente.io": &cert,
|
||||
}
|
||||
@@ -94,6 +95,7 @@ var _ = Describe("Proof", func() {
|
||||
})
|
||||
|
||||
It("uses NameToCertificate entries with wildcard", func() {
|
||||
config.Certificates = []tls.Certificate{cert, cert} // two entries so the long path is used
|
||||
config.NameToCertificate = map[string]*tls.Certificate{
|
||||
"*.clemente.io": &cert,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user