## Creating a Private key and a Certificate

Use the Certificate Generator (a software development kit command line tool) to create a private key and a self-signed certificate.

- With the Certificate Generator, create a private key and a self-signed certificate by using the following command:

makekeys -cert [-v] [-len <key-length> ] [-password <password> ] -dname <distinguished-name-string> <private-key-file> <public-key-cert>
For example: makekeys -cert -dname “CN=Symbian OU=Development OR=SymbianLtd CO=GB” mykey.key mycert.cer
Note: The Certification Generator uses a mouse input mechanism to generate the private key. The MSDOS property QuickEdit must be turned off for sampling of random data from the mouse to work.

- Create a certificate request specifying the created private key and self-signed certificate by using the following command:

makekeys – req [-v][-password password] -dname <distinguished-name-string> <private-key-file> <public-key-cert> <cert-request-file>
For example: makekeys req -dname “CN=Symbian OU=Development OR=SymbianLtd CO=GB” mykey.key mycert.cer myreq.p10
Send the certificate request to the Certificate Authority (CA).

- The CA uses various means to ensure the identification of the originator of the certificate request.
- The CA signs your public key using the CA’s private key, and creates a certificate, which is then sent back to you.
- The CA may return a single certificate or a file containing a chain of certificates. The file containing a certificate chain is needed if intermediate certificates are required between the CA’s root certificate on the Symbian OS device and the developer certificate.
- You receive the authenticated digital certificate.

Note: Certificates returned by the CA must be in the base64-encoded ASCII format. The Certification Generator generates base64-encoded certificate files and expects certificates that come back from the CA to be in the same format.
With Carbide.ui:

- Specify the private key used to create the digital signature
- Specify the public key certificate to be used to decrypt it. For a secure installation, the certificate should be an authenticated digital certificate. However, the self-signed certificate can also be used.

Note: You can also create keys using the Handle Key Pairs window.

### Command Arguements

-cert | Create the private key (<private-key-file>) and self-signed certificate (<public-key-cert>). If the private key file already exists, it is used to create the self-signed certificate.
-req | Create a certificate request.
-view | View certificate details.
-v | Verbose mode — displays additional diagnostic information.
-dname <distinguished-name-string> | The <distinguished-name-string> specifies the distinguished name parameters required for the self-signed public key certificate file. This command line option must be constructed of a string of white-space-separated key=value pairs as follows: CN=common name OU=organisational unit OR=organisation LO=locality ST=state CO=country EM=e-mail address For example: "CN=Symbian OU=Development OR=SymbianLtd CO=GB"
-password <password> | Password (optional). After creation, the password must be supplied to subsequently use the private key.
-len <key-length> | The key-length. The minimum is 512, maximum is 4096. The key length defaults to 1024.
<private-key-file> | The file containing the private key. The developer keeps the private key secret, whereas the public key is usually made generally available. The file has a .key extension.
<public-key-cert> | A self-signed certificate containing the public key. The file has a .cer extension.
<cert-request-file> | A self-contained file that is sent to the Certificate Authority (CA). The Certification Generator creates this file with a private and public key. It is then up to the developer to send the file to the CA and arrange for the application of the certificate. The file has a .p10 extension.