cmu requestcertificate
This function creates a PKCS #10 certificate request for an RSA/DSA/ECDSA key pair on the token or HSM. It must be provided with the handle/OUID either to the public key or to the corresponding private key (all of the public key components are contained within the private key). The private key must have signing capability because it is used to sign the certificate request structure. The signature is done using any of the mechanisms listed below. The subject name is defined by a series of optional RDN components.
If none of these components are provided on the command line, the CKA_SUBJECT of the private key is used as the subject of the certificate request. If the private key does not have its CKA_SUBJECT attribute set, the user will be queried for each of the RDN components. The Subject DN should contain at least the country, organization and common name components.
The signed certificate request is output to the specified file.
Syntax
cmu requestCertificate {-publichandle=<pubkeyhandle#> | -publicouid=<pubkeyOUID#>} {-privatehandle=<privkeyhandle#> | -privateouid=<privkeyOUID#>} -outputFile=<filename> [-sha1WithRsa] [-sha224withrsa] [-sha256withrsa] [-sha384withrsa] [-sha512withrsa] [-sha1withdsa] [-sha1withecdsa] [-sha224withecdsa] [-sha256withecdsa] [-sha384withecdsa] [-sha512withecdsa] [-C=<country>] [-S=<state>] [-L=<locality>] [-O=<organization>] [-OU=<org_unit>] [-CN=<common_name>] [-e=<e-mail_address>] [-binary] [-password=<password>] [-ped=<PED_ID>] [-slot=<slot#>] [
Argument(s) | Description |
---|---|
-binary | Defines the certificate request format to be raw binary (DER encoding) instead of the default PEM (base64) encoding. |
-C=<country> | Defines the two-letter country name for the subject distinguished name (DN) of the certificate request. This parameter should be present in the subject DN. |
-CN=<common_name> | Defines the common name for the subject distinguished name (DN) of the certificate request. This parameter should be present in the subject DN. |
-E=<e-mail_address> | Official or contact e-mail address of certificate authority. |
-L=<locality> | Defines the locality (typically the city) for the subject distinguished name of the certificate request. This parameter may be present in the Subject DN. |
-md5withrsa | Defines the signature algorithm for the certificate request to be pkcs-1-md5withRSAEncryption. The default is to use sha1WithRsa. |
-multiorg | For Organization Name and Organization Unit name, the user may make multiple entries if the -multiorg option was provided. |
-O=<organization> | Defines the organization name for the subject distinguished name (DN) of the certificate request. This parameter should be present in the subject DN. |
-OU=<org_unit> | Defines the organization unit name for the subject distinguished name (DN) of the certificate request. This parameter may be present in the subject DN. |
-outputFile=<filename> | Defines the file that receives the certificate request. |
-privatehandle=<privkeyhandle#> | Defines the handle to the private key from an RSA key pair to be certified. If this parameter is omitted and there is only one private signing key on the partition, that key is automatically selected. If this parameter is omitted and there are multiple private signing keys on the partition, the user is asked to select the private signing key. This method of selection applies to Luna HSMs only. On a Luna Cloud HSM service slot, use -privateouid. |
-privateouid=<privkeyOUID#> | Defines the Object Unified Identifier (OUID) of the private key from an RSA key pair to be certified. If this parameter is omitted and there is only one private signing key on the partition, that key is automatically selected. If this parameter is omitted and there are multiple private signing keys on the partition, the user is asked to select the private signing key. This method of selection requires Luna HSM Client 10.2.0 or newer, and applies to Luna Cloud HSM services only. On a Luna HSM slot, use -privatehandle. |
-publichandle=<pubkeyhandle#> | Defines the handle to the public key from an RSA key pair to be certified. If this parameter is omitted and there is only one public signing key on the HSM, that key is automatically selected. If this parameter is omitted and there are multiple public signing keys on the HSM, the user is asked to select the public signing key. This method of selection applies to Luna HSMs only. On a Luna Cloud HSM service slot, use -publicouid. |
-publicouid=<pubkeyOUID#> | Defines the Object Unified Identifier (OUID) of the public key from an RSA key pair to be certified. If this parameter is omitted and there is only one public signing key on the partition, that key is automatically selected. If this parameter is omitted and there are multiple public signing keys on the partition, the user is asked to select the public signing key. This method of selection requires Luna HSM Client 10.2.0 or newer, and applies to Luna Cloud HSM services only. On a Luna HSM slot, use -publichandle. |
-S=<state> | Defines the state or province name for the subject distinguished name of the certificate request. This parameter may be present in the Subject DN. |
-sha1withdsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha1withDSAEncryption. The default is to use sha1WithRsa. |
-sha1withecdsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha1withECDSAEncryption. The default is to use sha1WithRsa. |
-sha1WithRsa | Defines the signature algorithm for the certificate request to be pkcs-1-SHA1withRSAEncryption. The default is to use sha1WithRsa. |
-sha224withecdsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha224withECDSAEncryption. The default is to use sha1WithRsa. |
-sha224withrsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha224withRSAEncryption. The default is to use sha1WithRsa. |
-sha256withecdsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha256withECDSAEncryption. The default is to use sha1WithRsa. |
-sha256withrsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha256withRSAEncryption. The default is to use sha1WithRsa. |
-sha384withecdsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha384withECDSAEncryption. The default is to use sha1WithRsa. |
-sha384withrsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha384withRSAEncryption. The default is to use sha1WithRsa. |
-sha512withecdsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha512withECDSAEncryption. The default is to use sha1WithRsa. |
-sha512withrsa | Defines the signature algorithm for the certificate request to be pkcs-1-sha512withRSAEncryption. The default is to use sha1WithRsa. |
Common | |
-password=<password> | The password for the role accessing the current slot, with the current command. If this is not specified, it is prompted. |
-ped=<PED_ID> | Specifies the PED ID for the registered Remote PED that will handle authentication for the current slot, with the current command. You must specify this parameter to use Remote PED authentication. |
-slot=<slot#> | The slot to be acted upon, by the current command. If this is not specified, it is prompted. |
Examples
The following example supports client versions 10.1 and lower:
cmu requestCert –privatehandle=7 -publichandle=6 -C=CA -L=Ottawa -O=Thales -CN=TestCertificate -outputFile=testCert.req
The following example supports client versions 10.2 and above with Luna Cloud HSM service slots:
cmu requestCert –privateouid=650200000d0000b8397e0800 -publicouid=640200000d0000b8397e0800 -C=CA -L=Ottawa -O=Thales -CN=TestCertificate -outputFile=testCert.req