I use the SSL example located in the Netty example code folder:
String keyStoreFilePath = System.getProperty("keystore.file.path"); String keyStoreFilePassword = System.getProperty("keystore.file.password"); KeyStore ks = KeyStore.getInstance("JKS"); FileInputStream fin = new FileInputStream(keyStoreFilePath); ks.load(fin, keyStoreFilePassword.toCharArray()); // Set up key manager factory to use our key store // Assume key password is the same as the key store file // password KeyManagerFactory kmf = KeyManagerFactory.getInstance(algorithm); kmf.init(ks, keyStoreFilePassword.toCharArray());
I created my own keystore using:
/usr/java/jdk1.6.0_25/bin/keytool -genkey -keystore SrvKeystore -keyalg RSA
And everything works fine !!
However, now I want to use the official certificate provided to me by comodo ( https://secure.comodo.com/ )
They obviously provide 3 types of files: .csr, .crt and .key
Please advise which file should point to keystore.file.path and keystore.file.password
Maybe I need to do something else?
source share