Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions command/ca/provisioner/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ SCEP
sshHostDefaultDurFlag,
disableRenewalFlag,
allowRenewalAfterExpiryFlag,
disableSmallstepExtensionsFlag,
//enableX509Flag,
enableSSHFlag,

Expand Down Expand Up @@ -360,8 +361,9 @@ func addAction(ctx *cli.Context) (err error) {
HostDurations: &linkedca.Durations{},
Enabled: !(ctx.IsSet("ssh") && !ctx.Bool("ssh")),
},
DisableRenewal: ctx.Bool("disable-renewal"),
AllowRenewalAfterExpiry: ctx.Bool("allow-renewal-after-expiry"),
DisableRenewal: ctx.Bool("disable-renewal"),
AllowRenewalAfterExpiry: ctx.Bool("allow-renewal-after-expiry"),
DisableSmallstepExtensions: ctx.Bool("disable-smallstep-extensions"),
}

if ctx.IsSet("x509-min-dur") {
Expand Down
4 changes: 4 additions & 0 deletions command/ca/provisioner/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns",
Name: "allow-renewal-after-expiry",
Usage: `Allow renewals for expired certificates generated by this provisioner.`,
}
disableSmallstepExtensionsFlag = cli.BoolFlag{
Name: "disable-smallstep-extensions",
Usage: `Disable the Smallstep extension for all certificates generated by this provisioner.`,
}
//enableX509Flag = cli.BoolFlag{
// Name: "x509",
// Usage: `Enable provisioning of x509 certificates.`,
Expand Down
6 changes: 5 additions & 1 deletion command/ca/provisioner/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ SCEP
sshHostDefaultDurFlag,
disableRenewalFlag,
allowRenewalAfterExpiryFlag,
disableSmallstepExtensionsFlag,
//enableX509Flag,
enableSSHFlag,

Expand Down Expand Up @@ -404,8 +405,11 @@ func updateClaims(ctx *cli.Context, p *linkedca.Provisioner) {
if ctx.IsSet("allow-renewal-after-expiry") {
p.Claims.AllowRenewalAfterExpiry = ctx.Bool("allow-renewal-after-expiry")
}
claims := p.Claims
if ctx.IsSet("disable-smallstep-extensions") {
p.Claims.DisableSmallstepExtensions = ctx.Bool("disable-smallstep-extensions")
}

claims := p.Claims
if claims.X509 == nil {
claims.X509 = &linkedca.X509Claims{}
}
Expand Down