replace keystore by pem