mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-26 06:28:18 +02:00
envoyconfig: add virtual host domains for certificates in addition to routes (#3593)
* envoyconfig: add virtual host domains for certificates in addition to routes * Update pkg/cryptutil/certificates.go Co-authored-by: bobby <1544881+desimone@users.noreply.github.com> * Update pkg/cryptutil/tls.go Co-authored-by: bobby <1544881+desimone@users.noreply.github.com> * comments Co-authored-by: bobby <1544881+desimone@users.noreply.github.com>
This commit is contained in:
parent
23c42da8ec
commit
33794ff316
6 changed files with 99 additions and 14 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestGetCertificateForDomain(t *testing.T) {
|
||||
|
@ -62,3 +63,9 @@ func TestGetCertificateForDomain(t *testing.T) {
|
|||
assert.NotNil(t, found)
|
||||
})
|
||||
}
|
||||
|
||||
func TestGetCertificateDomains(t *testing.T) {
|
||||
cert, err := GenerateSelfSignedCertificate("www.example.com")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, []string{"www.example.com"}, GetCertificateDomains(cert))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue