question

SAI avatar image
SAI asked

Getting a keytool error when creating a java keystore

I'm following this guide: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/using-the-alexa-skills-kit-samples-java It tells me to create a private key and a self signed cert from this guide: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/testing-an-alexa-skill I complete the 2nd guide and end up with the following files in my SSL working directory: certificate.pem configuration_internet.cnf configuration_local.cnf keystore.pkcs12 private-key.pem (Ignore the 2 cnf files, I used the configuration_local.cnf file to generate the private key). I was able to execute step 1 to generate the keystore (keystore.pkcs12 file). I keep failing at the 2nd step: $JAVA_HOME/bin/keytool -importkeystore \ -destkeystore java-keystore.jks \ -srckeystore keystore.pkcs12 \ -srcstoretype PKCS12 "keytool error: java.lang.NullPointerException: invalid null input" I notice that I do not have the java-keystore.jks file. Could this be the reason why the command is failing? If so, how do I generate this file? Thanks in advance! PS - I'm running Windows 10 64-bit with java version "1.8.0_51" 64 bit.
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Ross@Amazon avatar image
Ross@Amazon answered
The reason for this may be any of the files created by you, namely certificate.pem, configuration_internet.cnf, configuration_local.cnf, keystore.pkcs12, private-key.pem, were created improperly. The java-keystore.jks file would be generated as a part of command you are trying to execute, so it is not required to be present. The best solution is to delete the current files and create them again using the steps mentioned in documentation.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.