I am trying to update a keystore with a renewed SSL certificate that I downloaded from my Ionos webhost.
I downloaded the PFX file after inputing my private key and password into their PFX creation tool and checked an option to "include intermediate certificates" (this is what I have always done in the past).
When I ran keytool to update the keystore this is the command I used:
keytool -importkeystore -srckeystore example.com_private_key.pfx -srcstoretype pkcs12 -destkeystore mykeystore.jks -deststoretype JKS
It asks me to enter some passwords and then asks me if I wanted to override the alias. After entering "yes" it gave me the "Invalid null input" error.
I also tried creating a new keystore instead of updating the old one and after entering the passwords I received the same error.
I still have my old PFX file from last year and keytool doesn't give the error when creating a keystore with that.
I also tried reissuing the private key and redownloading the PFX with and without the intermediate certificate option but got the same error.
I don't know where to even start to find out how to overcome this issue. My only assumption is that there is something wrong with the new PFX file but don't know how I can verify it or troubleshoot.
Any suggestions?
EDIT:
I decided to run keytool -list on the PFX file and this was the output
>keytool -list -v -keystore example.com_private_key.pfx
Enter keystore password:
Keystore type: PKCS12
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: *.example.com
Creation date: 22-Mar-2023
Entry type: PrivateKeyEntry
*******************************************
*******************************************
Usually this gives a big list of things but this seems empty.