Skip to content

Commit a2e2d27

Browse files
committed
Use ca-url passed by the command line or configured
1 parent 67de3be commit a2e2d27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

command/ca/certificate.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ func (f *certificateFlow) getClient(ctx *cli.Context, subject, token string) (ca
248248
// Prepare client for bootstrap or provisioning tokens
249249
var options []ca.ClientOption
250250
if len(claims.SHA) > 0 && len(claims.Audience) > 0 && strings.HasPrefix(strings.ToLower(claims.Audience[0]), "http") {
251-
caURL = claims.Audience[0]
251+
if len(caURL) == 0 {
252+
caURL = claims.Audience[0]
253+
}
252254
options = append(options, ca.WithRootSHA256(claims.SHA))
253255
} else {
254256
if len(caURL) == 0 {

0 commit comments

Comments
 (0)