Im having a potential issue, or possibly a lack of patience, using keytool in the command line. Ive created a keyStore successfully and i also generated a certificate request successfully. But when I attempt to generate the certificate from the request it appears to hang.
In the command line this is all i get
C:\Users\Mark\Desktop\Assignment 9>keytool -gencert -keystore myKeys\myKeys.keys
tore -alias mr -v
Enter keystore password:
Enter key password for <mr>
I do not get a new prompt, it just sits there like that on the command line. SO i cancel it and tried again a few times with no avail. Ive also toook note that in the process manager there is a keytool.exe running. I'm not sure if this is a long process or not and if i should leave it to its self for a bit or if there is a command cause that may hang the command.
I had this problem inside a centos 6 docker container
The command I was running is ...
keytool -import -noprompt -alias root -keystore ./out/keystore.jks -trustcacerts -file ./out/parent.crt -storepass ${jkspass};
I tried to change the Java version (to a version that works outside the container) and tried -infile as below ...
keytool -import -noprompt -alias root -keystore ./out/keystore.jks -trustcacerts -infile ./out/parent.csr -file ./out/parent.crt -storepass ${jkspass};
But nothing worked! Increasing memory did not fix issue either. I switched to an official Java docker container. Did not work. I gave up in the end.
If anyone knows the fix for this please advise.
Tripped on this too - had of course forgotten to supply the -infile
parameter to specity the input CSR file, so keytool was sitting there waiting for input.
(There was a hint in the error shown when the command was forcibly aborted: keytool error: java.io.IOException: Encoding bytes too short.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With