Creating and Importing Self-Signed Certificates in Development Environments

Use a self-signed certificate generated from the Java SDK keytool utility, andimports it into the Unwired Platform for DCN encryption testing.

Prerequisites
To use the keytool utility, 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.
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 chageit
    Follow the prompts to generate a public-private keypair for the Acme organization.
    Prompt Value Entered
    Name Admin's name
    Organization Your company name
    Organizational Unit Development
    City Your city
    State/Province Your location
    Country Code Your country
  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