B.5.3 Managing Certificates

MEKeyTool manages the public keys of certificate authorities (CAs), making it functionally similar to the keytool utility that comes with the J2SE SDK. The keys can be used to facilitate secure HTTP communication over SSL (HTTPS).

Before using MEKeyTool, you must first have access to a Java Cryptography Extension (JCE) keystore. You can create one using the J2SE keytool utility; see

http://java.sun.com/j2se/1.4/docs/tooldocs/win32/keytool.html for more information.

To run MEKeyTool, open a command prompt, change the current directory to {toolkit}\bin, and enter the following command:

mekeytool.exe <command>

The commands are as follows:

-help

Print the usage instructions for MEKeyTool.

-import -alias <alias> [-keystore <JCEkeystore>] [-storepass <storepass>] -domain <domain_name>

Import a public key into the ME keystore from the given JCE keystore using the given JCE keystore password. The default ME keystore is {toolkit}\appdb\_main.ks and the default JCE keystore is {user.home}\.keystore.

-list

List the keys in the ME keystore, including the owner and validity period for each. The ME keystore is {toolkit}\appdb\_main.ks.

-delete (-owner <owner> -number <key number>)

Delete a key from the given ME keystore with the given owner. The ME keystore is {toolkit}\appdb\_main.ks.

Note – The J2ME Wireless Toolkit contains an ME keystore called _main.ks, which is located in the appdb subdirectory. This keystore includes all the certificates that exist in the default J2SE keystore, which comes with the J2SE SDK installation.

112 J2ME Wireless Toolkit User’s Guide • October 2004

Page 124
Image 124
Sun Microsystems J2ME manual Managing Certificates