-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated cert extension parameters to use common naming convention
- Loading branch information
1 parent
7ce52e3
commit 8a4e004
Showing
4 changed files
with
51 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1037,6 +1037,8 @@ func TestBackend_dns_singleCert(t *testing.T) { | |
Steps: []logicaltest.TestStep{ | ||
testAccStepCert(t, "web", ca, "foo", allowed{dns: "example.com"}, false), | ||
testAccStepLogin(t, connState), | ||
testAccStepCert(t, "web", ca, "foo", allowed{dns: "*ample.com"}, false), | ||
testAccStepLogin(t, connState), | ||
testAccStepCert(t, "web", ca, "foo", allowed{dns: "notincert.com"}, false), | ||
testAccStepLoginInvalid(t, connState), | ||
testAccStepCert(t, "web", ca, "foo", allowed{dns: "abc"}, false), | ||
|
@@ -1066,6 +1068,8 @@ func TestBackend_email_singleCert(t *testing.T) { | |
Steps: []logicaltest.TestStep{ | ||
testAccStepCert(t, "web", ca, "foo", allowed{emails: "[email protected]"}, false), | ||
testAccStepLogin(t, connState), | ||
testAccStepCert(t, "web", ca, "foo", allowed{emails: "*@example.com"}, false), | ||
testAccStepLogin(t, connState), | ||
testAccStepCert(t, "web", ca, "foo", allowed{emails: "[email protected]"}, false), | ||
testAccStepLoginInvalid(t, connState), | ||
testAccStepCert(t, "web", ca, "foo", allowed{emails: "abc"}, false), | ||
|
@@ -1305,9 +1309,9 @@ func testAccStepListCerts( | |
type allowed struct { | ||
names string // allowed names in the certificate, looks at common, name, dns, email [depricated] | ||
common_names string // allowed common names in the certificate | ||
dns string // allowed dns names in the certificate | ||
emails string // allowed email names in the certificate | ||
uris string // allowed uris in SAN section of the certificate | ||
dns string // allowed dns names in the SAN extension of the certificate | ||
emails string // allowed email names in SAN extension of the certificate | ||
uris string // allowed uris in SAN extension of the certificate | ||
ext string // required extensions in the certificate | ||
} | ||
|
||
|
@@ -1323,9 +1327,9 @@ func testAccStepCert( | |
"display_name": name, | ||
"allowed_names": testData.names, | ||
"allowed_common_names": testData.common_names, | ||
"allowed_dns": testData.dns, | ||
"allowed_emails": testData.emails, | ||
"allowed_uris": testData.uris, | ||
"allowed_dns_sans": testData.dns, | ||
"allowed_email_sans": testData.emails, | ||
"allowed_uri_sans": testData.uris, | ||
"required_extensions": testData.ext, | ||
"lease": 1000, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters