Generate certificate for existing keypair
Generate certificate commands begin with:
smctl keypair generate-cert
or
smctl kp gen-cert
Flags
Generate certificate commands support these flags:
Shortcut | Flag | Description |
---|---|---|
--cert-alias string | Alias for the certificate. Format: --cert-alias="<value>" | |
--cert-profile-id string | Certificate profile ID. Format: --cert-profile-id="<value>" | |
--custom-fields stringToString | Custom fields in case of CertCentral profile. Default is []. Format: --custom-fields="<value>" | |
--set-as-default-cert | Set as default certificate for keypair. If this is not set, the generated certificate becomes the default certificate. | |
--account-id string | Account ID for the user. Format: --account-id="<value>" | |
--help | Help for generate-cert with existing keypair. |
Examples
Generate a certificate
Generate a certificate by providing the keypair ID.
Command:
smctl keypair generate-cert <keypair id>
Command sample:
smctl keypair generate-cert 7747527b-6cc0-4ccf-8099-a6df1bf90bc14
Generate a test certificate
Generate a test certificate for an existing test keypair. This generates a 30-day certificate for an existing 30-day keypair.
Command:
smctl keypair generate-cert <keypair ID> --cert-alias <cert_alias> --cert-profile-id <profile ID>
Command sample:
smctl keypair generate-cert <keypair ID> --cert-alias <cert_alias> --cert-profile-id <profile ID>
Generate a key and certificate with different aliases
Generate a keypair and certificate with different aliases by referencing the an alias for the certificate, keypair, and providing the certificate profile. This command is used when certificate profiles are enabled on the account.
Command:
smctl keypair generate rsa <key alias> --generate-cert --cert-alias <cert alias> --cert-profile-id <cert_profile_ID>
Command sample:
smctl keypair generate rsa RSA-KP-1 --generate-cert --cert-alias CERT-1 --cert-profile-id 022df79f-e684-4788-be16-b490cbfbc46c