Skip to content

Commit 142c0b1

Browse files
authored
Merge pull request #1516 from smallstep/mariano/fix-1492
Make --attestation-uri incompatible with --kms
2 parents cde640b + 9686d6f commit 142c0b1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

command/ca/certificate.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,16 @@ func certificateAction(ctx *cli.Context) error {
228228
offline := ctx.Bool("offline")
229229
sans := ctx.StringSlice("san")
230230

231-
// offline and token are incompatible because the token is generated before
232-
// the start of the offline CA.
233-
if offline && tok != "" {
231+
switch {
232+
case offline && tok != "":
233+
// offline and token are incompatible because the token is generated before
234+
// the start of the offline CA.
234235
return errs.IncompatibleFlagWithFlag(ctx, "offline", "token")
236+
case ctx.String("attestation-uri") != "" && ctx.String("kms") != "":
237+
// attestation-uri and kms are incompatible because the ACME-DA flow
238+
// expects all necessary parameters in the attestation-uri, and having
239+
// both can be confusing.
240+
return errs.IncompatibleFlagWithFlag(ctx, "attestation-uri", "kms")
235241
}
236242

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

0 commit comments

Comments
 (0)