Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions command/ca/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,16 @@ func certificateAction(ctx *cli.Context) error {
offline := ctx.Bool("offline")
sans := ctx.StringSlice("san")

// offline and token are incompatible because the token is generated before
// the start of the offline CA.
if offline && tok != "" {
switch {
case offline && tok != "":
// offline and token are incompatible because the token is generated before
// the start of the offline CA.
return errs.IncompatibleFlagWithFlag(ctx, "offline", "token")
case ctx.String("attestation-uri") != "" && ctx.String("kms") != "":
// attestation-uri and kms are incompatible because the ACME-DA flow
// expects all necessary parameters in the attestation-uri, and having
// both can be confusing.
return errs.IncompatibleFlagWithFlag(ctx, "attestation-uri", "kms")
}

// certificate flow unifies online and offline flows on a single api
Expand Down