Publisher: abort if conflicting chains configured (#6266)

Fixes #6089
This commit is contained in:
Aaron Gable 2022-08-01 14:05:36 -07:00 committed by GitHub
parent 631ff88451
commit 315f281d6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package notmain
import (
"flag"
"fmt"
"os"
"runtime"
@ -87,6 +88,9 @@ func main() {
cmd.FailOnError(err, "failed to load chain.")
issuer := chain[0]
id := issuer.NameID()
if _, exists := bundles[id]; exists {
cmd.Fail(fmt.Sprintf("Got multiple chains configured for issuer %q", issuer.Subject.CommonName))
}
bundles[id] = publisher.GetCTBundleForChain(chain)
}