Creating a New Key Pair and Self-signed Certificate This example uses the keytool program to create a new key pair and self-signed certificate for the principal Duke. < keytool -genkey -alias alias -keystore .keystore Enter keystore password: password What is your first and last name? [Unknown]: Duke What is the name of your organizational unit? [Unknown]: JavaSoft What is the name of your organization? [Unknown]: Sun What is the name of your City or Locality? [Unknown]: Cupertino What is the name of your State or Province? [Unknown]: CA What is the two-letter country code for this unit? [Unknown]: US Is correct? [no]: yes