RSA keystore and pem certificate

Hi,

I need to run a test scenario with SSL.
I have keystore file which is RSA private key and the certificate in .pem format.
I converted RSA to PKCS12 key using

openssl pkcs12 -export -in PSAPI_QA.pem -inkey PSAPI_QA.key -out client.p12 -name PSAPI_QA.p12

and ran with this conf:

keyStore {

type = “PKCS12” # Type of SSLContext’s KeyManagers store

file = “client.p12” # Location of SSLContext’s KeyManagers store

#password = “” # Password for SSLContext’s KeyManagers store

#algorithm = “” # Algorithm used SSLContext’s KeyManagers store

}

trustStore {

type = “PEM” # Type of SSLContext’s TrustManagers store

file = “PSAPI_QA.pem” # Location of SSLContext’s TrustManagers store

#password = “” # Password for SSLContext’s TrustManagers store

#algorithm = “” # Algorithm used by SSLContext’s TrustManagers store

}

I get the following error.

Exception in thread “main” java.security.KeyStoreException: PEM not found

Can someone please help me with this ?

  • Should keystore and trust store be in the same format ?

  • How do I work with the RSA key and the .pem certificate file

Thanks.