mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-12 07:42:49 +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
|
@ -165,3 +165,18 @@ func TestPrivateKeyMarshaling(t *testing.T) {
|
|||
t.Fatal("private key encoding did not match")
|
||||
}
|
||||
}
|
||||
|
||||
func TestEncodeCertificate(t *testing.T) {
|
||||
t.Run("nil", func(t *testing.T) {
|
||||
cert, key, err := EncodeCertificate(nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, cert)
|
||||
assert.Nil(t, key)
|
||||
})
|
||||
t.Run("empty certificate", func(t *testing.T) {
|
||||
cert, key, err := EncodeCertificate(&tls.Certificate{})
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, cert)
|
||||
assert.Nil(t, key)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue