chore: cert.name flags

This commit is contained in:
Fernandez Ludovic 2026-02-06 03:35:44 +01:00
commit 92f72bf58e

View file

@ -91,6 +91,7 @@ const (
// Flag names related to certificates.
const (
flgCertTimeout = "cert.timeout"
flgCertName = "cert.name"
)
// Flag names related to the network stack.
@ -670,7 +671,7 @@ func createRevokeFlags() []cli.Flag {
Sources: cli.EnvVars(toEnvName(flgReason)),
Usage: "Identifies the reason for the certificate revocation." +
" See https://www.rfc-editor.org/rfc/rfc5280.html#section-5.3.1." +
" Valid values are:" +
"\n\tValid values are:" +
" 0 (unspecified), 1 (keyCompromise), 2 (cACompromise), 3 (affiliationChanged)," +
" 4 (superseded), 5 (cessationOfOperation), 6 (certificateHold), 8 (removeFromCRL)," +
" 9 (privilegeWithdrawn), or 10 (aACompromise).",
@ -737,6 +738,23 @@ func createDomainFlag() cli.Flag {
}
}
func createCertNameFlag() cli.Flag {
return &cli.StringFlag{
Category: categoryStorage,
Name: flgCertName,
Sources: cli.EnvVars(toEnvName(flgCertName)),
Usage: "The certificate ID/Name, used to store and retrieve a certificate. By default, it uses the first domain name.",
}
}
func createCertNamesFlag() cli.Flag {
return &cli.StringSliceFlag{
Name: flgCertName,
Sources: cli.EnvVars(toEnvName(flgCertName)),
Usage: "The certificate IDs/Names, used to retrieve the certificates.",
}
}
func createPathFlag(forceCreation bool) cli.Flag {
return &cli.StringFlag{
Category: categoryStorage,