Search code examples
javawindowscertificatewindows-server-2012

Issue generating a certificate signing request


Hi I am trying to create a certificate request for HTTPS for a JAVA app. I have successfully created the tomcat.keystore and I am now trying to create certificate signing request but I get the below error.

keytool error: java.io.FileNotFoundException: ôC:\cm_certreq.csrö (The filename, directory name, or volume label syntax is incorrect)

I am running the following command as an admin:

keytool -certreq -keyalg “RSA” -alias cm -file “C:\Temp\cm_certreq.csr” -keystore "C:\Users\Myaccount\Appdata\Roaming\Conf\tomcat.keystore"


Solution

  • I would guess it's your quotes that is of some kind of wierd format by the look of it. Might be due to some encoding-issues in your IDE/tooling?

    Try the following instead and it should work:

    keytool -certreq -keyalg "RSA" -alias cm -file "C:\Temp\cm_certreq.csr" -keystore "C:\Users\Myaccount\Appdata\Roaming\Conf\tomcat.keystore"