The ME Key Tool uses the Javatm Standard Edition (J2SE) keystore API to access J2SE keystores. J2SE provides the command line tool to manage J2SE keystores.
The general usage for the ME Key Tool is (from the MIDP home directory):
java -jar bin/MEKeyTool.jar
(command followed by arguments for the command)
The ME Key Tool provides the following commands.
MEKeyTool argument combinations: -help -import [-MEkeystore <filename>] [-keystore <filename>] [-storepass <password>] -alias <key alias> [-domain <domain>] -list [-MEkeystore <filename>] -delete [-MEkeystore <filename>] (-owner <owner name> | -number <key number>) The default for -MEkeystore is "appdb/_main.ks". The default for -keystore is $HOME/.keystore.
The command for importing a public key into an ME keystore from a J2SE keystore is "-import". The command has the following arguments:
The following steps are performed when listing the key in an ME keystore.Key 1 Owner: C=US;O=RSA Data Security, Inc.;OU=Secure Server Certification Authority Valid from Tue Nov 08 19:00:00 EST 1994 to Thu Jan 07 18:59:59 EST 2010 Security Domain: untrusted Key 2 Owner: CN=Sun Microsystems Inc TEST CA;O=Sun Microsystems Inc Valid from Mon Nov 20 16:20:50 EST 2000 to Fri Nov 20 16:20:50 EST 2009 Security Domain: trusted
Error Condition | Message to User |
---|---|
There is no command or arguments. | Error: No command given |
The first argument after the ME Key Tool JAR name is not a command. | Error: Invalid command: <invalid argument> |
An argument for a command is not valid for that command. | Error: Invalid argument for <command> command: <invalid argument> |
The arguments end after an option flag (command arguments that start with "-") that should be followed by a value. | Error: Missing value for <last argument> |
-alias was not given to the import command. | Error: J2SE key alias was not given |
A non-digit character in the -number argument. | Error: Invalid number for the -number argument: <invalid number> |
Neither -owner of -number given for the delete command. | Error: Neither key -owner or -number was not given |
Both -owner of -number given for the delete command. | Error: -owner and -number cannot be used together |
The key for a given owner cannot be found in the ME keystore. | Error: Key not found for: <owner argument> |
The key number given was out of range. | Error: Invalid number for the -number delete option: <key number argument> |
No certificate was found in the J2SE keystore with the given alias | Error: Certificate not found |
The certificate found in the J2SE keystore does not have an RSA public key. | Error: Key in certificate is not an RSA key |
The public key to be imported is matches a key already in the ME keystore belonging to the same owner. | Error: Owner already has this key in the ME keystore |
Corrupted (or not a keystore file) ME keystore given | Error: input storage corrupted |
Corrupted (or not a keystore file) J2SE keystore given, J2SE keystore password incorrect, or any other error condition not listed above |
Error: <exception message> |