You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flag.StringVar(&c.KMS, "kms", kmsuri, "PKCS #11 URI with the module-path and token to connect to the module.")
103
110
flag.StringVar(&c.Pin, "pin", "", "PKCS #11 PIN")
104
-
flag.StringVar(&c.RootObject, "root-cert", "pkcs11:id=7330;object=root-cert", "PKCS #11 URI with object id and label to store the root certificate.")
105
-
flag.StringVar(&c.RootPath, "root-cert-path", "root_ca.crt", "Location to write the root certificate.")
106
-
flag.StringVar(&c.RootKeyObject, "root-key", "pkcs11:id=7330;object=root-key", "PKCS #11 URI with object id and label to store the root key.")
111
+
// Option 1: Generate new root
112
+
flag.BoolVar(&c.GenerateRoot, "root-gen", true, "Enable the generation of a root key.")
107
113
flag.StringVar(&c.RootSubject, "root-name", "PKCS #11 Smallstep Root", "Subject and Issuer of the root certificate.")
108
-
flag.StringVar(&c.CrtObject, "crt-cert", "pkcs11:id=7331;object=intermediate-cert", "PKCS #11 URI with object id and label to store the intermediate certificate.")
109
-
flag.StringVar(&c.CrtPath, "crt-cert-path", "intermediate_ca.crt", "Location to write the intermediate certificate.")
110
-
flag.StringVar(&c.CrtKeyObject, "crt-key", "pkcs11:id=7331;object=intermediate-key", "PKCS #11 URI with object id and label to store the intermediate certificate.")
114
+
flag.StringVar(&c.RootObject, "root-cert-obj", "pkcs11:id=7330;object=root-cert", "PKCS #11 URI with object id and label to store the root certificate.")
115
+
flag.StringVar(&c.RootKeyObject, "root-key-obj", "pkcs11:id=7330;object=root-key", "PKCS #11 URI with object id and label to store the root key.")
116
+
// Option 2: Read root from disk and sign intermediate
117
+
flag.StringVar(&c.RootFile, "root-cert-file", "", "Path to the root certificate to use.")
118
+
flag.StringVar(&c.KeyFile, "root-key-file", "", "Path to the root key to use.")
119
+
// Option 3: Generate certificate signing request
111
120
flag.StringVar(&c.CrtSubject, "crt-name", "PKCS #11 Smallstep Intermediate", "Subject of the intermediate certificate.")
112
-
flag.StringVar(&c.CrtKeyPath, "crt-key-path", "intermediate_ca_key", "Location to write the intermediate private key.")
121
+
flag.StringVar(&c.CrtObject, "crt-cert-obj", "pkcs11:id=7331;object=intermediate-cert", "PKCS #11 URI with object id and label to store the intermediate certificate.")
122
+
flag.StringVar(&c.CrtKeyObject, "crt-key-obj", "pkcs11:id=7331;object=intermediate-key", "PKCS #11 URI with object id and label to store the intermediate certificate.")
123
+
// SSH certificates
124
+
flag.BoolVar(&c.EnableSSH, "ssh", false, "Enable the creation of ssh keys.")
113
125
flag.StringVar(&c.SSHHostKeyObject, "ssh-host-key", "pkcs11:id=7332;object=ssh-host-key", "PKCS #11 URI with object id and label to store the key used to sign SSH host certificates.")
114
126
flag.StringVar(&c.SSHUserKeyObject, "ssh-user-key", "pkcs11:id=7333;object=ssh-user-key", "PKCS #11 URI with object id and label to store the key used to sign SSH user certificates.")
115
-
flag.BoolVar(&c.RootOnly, "root-only", false, "Store only only the root certificate and sign and intermediate.")
116
-
flag.StringVar(&c.RootFile, "root", "", "Path to the root certificate to use.")
117
-
flag.StringVar(&c.KeyFile, "key", "", "Path to the root key to use.")
118
-
flag.BoolVar(&c.EnableSSH, "ssh", false, "Enable the creation of ssh keys.")
127
+
// Output files
128
+
flag.StringVar(&c.RootPath, "root-cert-path", "root_ca.crt", "Location to write the root certificate.")
129
+
flag.StringVar(&c.CrtPath, "crt-cert-path", "intermediate_ca.crt", "Location to write the intermediate certificate.")
130
+
flag.StringVar(&c.CrtKeyPath, "crt-key-path", "", "Location to write the intermediate private key.")
131
+
// Others
119
132
flag.BoolVar(&c.NoCerts, "no-certs", false, "Do not store certificates in the module.")
120
133
flag.BoolVar(&c.Force, "force", false, "Force the delete of previous keys.")
121
134
flag.BoolVar(&c.Extractable, "extractable", false, "Allow export of private keys under wrap.")
0 commit comments