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 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#> -privatehandle=<privkeyhandle#> -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>] [-slot=<slot#>] [
Argument(s) | Description |
---|---|
-binary | Defines the certificate request format to be raw binary 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 HSM, that key is automatically selected. If this parameter is omitted and there are multiple private signing keys on the HSM, the user is asked to select the private signing key. |
-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. |
-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. |
-slot=<slot#> | The slot to be acted upon, by the current command. If this is not specified, it is prompted. |
Example
The following example creates a PEM encoded PKCS #10 certificate request for key 6:
cmu requestCert -publichandle=6 –privatehandle=7 -C=CA -L=Ottawa -O="Rainbow-Chrysalis" -CN="Test Certificate" -outputFile=testCert.req