Signing a java applet with an spc file from GoDaddy
I'm trying to sign a java applet using an spc file from godaddy. Here's the command I'm using:
keytool -import -keystore codesignstore -storepass [pass] -alias [alias] -file [filename]
Unfortunately, running this command returns
keytool error: java.lang.Exception: Input not an X.509 certificate
I talked to GoDaddy and they assure me that it is indeed a valid X.509 certificate and otherwise provided 0 help. Anyone know how to make this work? I've read a few comments that suggest that the problem might be the alias, but we've tried the alias we specified when creating the CSR as well as the one sp开发者_如何学Pythonecified in GoDaddy. In addition, some note that the problem may be related to this java bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4874076. However, I don't see any odd URLs in the spc of the type they note in that bug report. Thanks in advance for your help.
If you open up that spc file, you can export the certificates as X.509, in Windows with certmgr.msc
GoDaddy lets you download a .zip
file containing a .spc
file.
what is not evident is that an .spc
file is just a PKCS#7 certificate chain, they can easily be extracted using:
openssl pkcs7 -inform der -in *.spc -print_certs
While I don't know what was causing the error, I was able to get through the signing process by properly following GoDaddy's instructions. We originally generated our own CSR and then jumped into GoDaddy's instructions part of the way through. For others with this problem that have problems reading/following instructions, save yourself the headache and start over again following the steps that GoDaddy outlines.
精彩评论