title: How do I Import a Certificate from GoDaddy for Java Code Signing?
body: <p>I need to be able to sign jar files with a certificate from a CA.  </p>
  
  <p>I following the instructions from GoDaddy's documentation on how to do this:
  <a href="http://support.godaddy.com/help/article/4780/signing-java-code" rel="nofollow noreferrer">http://support.godaddy.com/help/article/4780/signing-java-code</a></p>
  
  <p>However, step 3 requires importing a cert file obtained from GoDaddy's web site.  Per the documentation, the command is: </p>
  
  <pre><code>keytool -import -trustcacerts -keystore codesignstore -storepass &lt;yourstorepwd&gt; -alias codesigncert -file mycert.cer
  </code></pre>
  
  <p>Although I successfully submit the CSR (generated by keytool) and get a response, I can't for the life of me figure out how to get the mycert.cer file.  There is an option to download a PEM file.  But after running the above command, I get the error "keytool error: java.lang.Exception: Incomplete certificate chain in reply".  I've tried this multiple times, and double-checked I'm using the proper keystore.  I've even tried re-keying using both SSH-1 one time, and then SSH-2 the other time.  According to this person (<a href="https://stackoverflow.com/questions/20793254/signing-a-jar-the-signers-certificate-chain-is-not-validated?rq=1">https://stackoverflow.com/questions/20793254/signing-a-jar-the-signers-certificate-chain-is-not-validated?rq=1</a>), they were able to at least successfully import the PEM file.  But I'm not sure if this is even the right approach.</p>
  
  <p>GoDaddy's tech support has been absolutely dreadful.  Most of the techs I've talked to aren't familiar with keytool at all, and it took me several tries calling them before they forwarded me to their SSL department (480-505-8852), which is at least marginally better than general support.  </p>
  
  <p>If I use Internet Explorer or Firefox, I believe I can automatically generate a CSR instead of creating one through key tool.  Then I'd export the certificate through the web browser.  From reading various other online documents, I believe I could then use openssl to convert to the proper format for keytool.  I'm not sure on the details of how this will work yet, but I don't see any other options.</p>
  
  <p>Has anyone been successful with this or have any pointers on how to proceed?  I found a similar question here (<a href="https://stackoverflow.com/questions/4369576/signing-a-java-applet-with-an-spc-file-from-godaddy">Signing a java applet with an spc file from GoDaddy</a>), but the answer simply points me to GoDaddy's poor documentation.  I would use a another CA if I could, but I've already paid the money and gone through the long, drawn-out verification process.</p>