mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 00:10:45 +02:00
envoy: upgrade to 1.21.1 (#3186)
* envoy: upgrade to 1.21.1 * envoy: upgrade to 1.21.1
This commit is contained in:
parent
75a037b901
commit
d6bd2d06ef
7 changed files with 88 additions and 56 deletions
|
@ -13,20 +13,29 @@ import (
|
|||
"github.com/pomerium/pomerium/pkg/cryptutil"
|
||||
)
|
||||
|
||||
func TestBuildSubjectAlternativeNameMatcher(t *testing.T) {
|
||||
func TestBuildSubjectAltNameMatcher(t *testing.T) {
|
||||
b := new(Builder)
|
||||
testutil.AssertProtoJSONEqual(t, `
|
||||
{ "exact": "example.com" }
|
||||
`, b.buildSubjectAlternativeNameMatcher(&url.URL{Host: "example.com:1234"}, ""))
|
||||
testutil.AssertProtoJSONEqual(t, `
|
||||
{ "exact": "example.org" }
|
||||
`, b.buildSubjectAlternativeNameMatcher(&url.URL{Host: "example.com:1234"}, "example.org"))
|
||||
testutil.AssertProtoJSONEqual(t, `
|
||||
{ "safeRegex": {
|
||||
"googleRe2": {},
|
||||
"regex": ".*\\.example\\.org"
|
||||
} }
|
||||
`, b.buildSubjectAlternativeNameMatcher(&url.URL{Host: "example.com:1234"}, "*.example.org"))
|
||||
testutil.AssertProtoJSONEqual(t, `{
|
||||
"sanType": "DNS",
|
||||
"matcher": {
|
||||
"exact": "example.com"
|
||||
}
|
||||
}`, b.buildSubjectAltNameMatcher(&url.URL{Host: "example.com:1234"}, ""))
|
||||
testutil.AssertProtoJSONEqual(t, `{
|
||||
"sanType": "DNS",
|
||||
"matcher": {
|
||||
"exact": "example.org"
|
||||
}
|
||||
}`, b.buildSubjectAltNameMatcher(&url.URL{Host: "example.com:1234"}, "example.org"))
|
||||
testutil.AssertProtoJSONEqual(t, `{
|
||||
"sanType": "DNS",
|
||||
"matcher": {
|
||||
"safeRegex": {
|
||||
"googleRe2": {},
|
||||
"regex": ".*\\.example\\.org"
|
||||
}
|
||||
}
|
||||
}`, b.buildSubjectAltNameMatcher(&url.URL{Host: "example.com:1234"}, "*.example.org"))
|
||||
}
|
||||
|
||||
func TestBuildSubjectNameIndication(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue