Creating Self-Signed Encryption Certificate

John creates a self-signed certificate with the Java SDK keytool utility before he imports it into the Unwired Platform for DCN encryption.

Prerequisites
To use the keytool utility, John knows he must set the JAVA_HOME environment variable to the JDK directory used by Unwired Platform, in addition to defining %JAVA_HOME%\bin as a the path variable. to the path variable, because keytool utility needs this setting.In this scenario, John uses the default of C:\Sybase\UnwiredPlatform\JDK1.6.0_26.
Task
  1. Change directory to <UnwiredPlatform_InstallDir>\Repository\Security, and run this command:
    keytool -genkey -alias dcn -keypass changeit -keyalg RSA -keysize 1024 -validity 3650 -keystore dcn.jks 
    -storepass changeit
    Follow the prompts to generate a public-private keypair for the Acme organization.
    Prompt Value Entered
    Name John
    Organization Acme Corporation
    Organizational Unit Development
    City Dublin
    State/Province CA
    Country Code US
  2. Use keytool to import the keystore to the destination keystore by using this command:
    keytool -importkeystore -destkeystore keystore.jks -deststorepass changeit -srckeystore dcn.jks 
    -srckeypass changeit -alias DCN
  3. Use keytool to export just the public key to the local disk.
    keytool -keystore keystore.jks -storepass changeit -alias DCN -export -file C:\temp\dcn.crt