Skip to content

Commit

Permalink
Check that profile matching defaultCertificateProfileName actually ex…
Browse files Browse the repository at this point in the history
…ists at startup
  • Loading branch information
pgporada committed Feb 23, 2024
1 parent fe36be7 commit b2f86f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/boulder-ca/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,12 @@ func main() {
certProfiles = append(certProfiles, profile)
}

var defaultNameCheck []*issuance.Profile
defaultNameCheck = append(defaultNameCheck, deprecatedProfile)
defaultNameCheck = append(defaultNameCheck, certProfiles...)
var defaultProfileExists bool
for index := range certProfiles {
if c.CA.Issuance.DefaultCertificateProfileName == certProfiles[index].Name {
for index := range defaultNameCheck {
if c.CA.Issuance.DefaultCertificateProfileName == defaultNameCheck[index].Name {
defaultProfileExists = true
break
}
Expand Down
1 change: 1 addition & 0 deletions test/config-next/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"issuance": {
"defaultCertificateProfileName": "defaultBoulderCertificateProfile",
"profile": {
"name": "defaultBoulderCertificateProfile",
"allowMustStaple": true,
"allowCTPoison": true,
"allowSCTList": true,
Expand Down

0 comments on commit b2f86f1

Please sign in to comment.