mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 18:06:34 +02:00
tls: wildcard catch-all cert must be at the end of cert list (#4119)
This commit is contained in:
parent
681cf6fa27
commit
34c1e44c7e
2 changed files with 2 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,6 +3,7 @@
|
|||
.*.yaml
|
||||
.*.json
|
||||
.*.rego
|
||||
*.jq
|
||||
pem
|
||||
env
|
||||
coverage.txt
|
||||
|
|
|
@ -114,9 +114,7 @@ func getAllCertificates(cfg *config.Config) ([]tls.Certificate, error) {
|
|||
return nil, fmt.Errorf("error getting wildcard certificate: %w", err)
|
||||
}
|
||||
|
||||
// wildcard certificate must be first so that it is used as the default certificate
|
||||
// when no SNI matches
|
||||
return append([]tls.Certificate{*wc}, allCertificates...), nil
|
||||
return append(allCertificates, *wc), nil
|
||||
}
|
||||
|
||||
func (b *Builder) buildTLSSocket(ctx context.Context, cfg *config.Config, certs []tls.Certificate) (*envoy_config_core_v3.TransportSocket, error) {
|
||||
|
|
Loading…
Add table
Reference in a new issue