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 .)
I presume you have wrong params, I had such issue when I wrote:
keytool -import -alias myCert -keystore "C:\Program
Files\Java\jdk1.8.0_144\jre\lib\security\cacerts -file myCert.cer
Issue was cause I opened simbold " but not closed. To fix I've written:
keytool -import -alias symantec -keystore "C:\Program
Files\Java\jdk1.8.0_144\jre\lib\security\cacerts" -file symantec-root.cer
So I believe you have some parateters witch is incorrect
I had the same problem migrating a keystore with keytool. Even worse the generated keystore did not have the correct password.
I realized that I modified the default security providers in my JDK, adding BuncyCastle FIPS compatible.
I reverted back the original ones and everything worked fine.
Not very long - 5 sec max. Have you tried: 1. Look in handle.exe
maybe somebody hold keystore? 2. Try another java version?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.