gd_bundle-g2-g1.crt: Go Daddy Certificate Bundles - G2 With Cross to G1, includes Rootgdig2.crt: Go Daddy Secure Server Certificate (Intermediate Certificate) - G22b9918dccf2f1d.crt: Your certificate
Source: https://certs.godaddy.com/anonymous/repository.pki
Answer from Jay on serverfault.comgd_bundle-g2-g1.crt: Go Daddy Certificate Bundles - G2 With Cross to G1, includes Rootgdig2.crt: Go Daddy Secure Server Certificate (Intermediate Certificate) - G22b9918dccf2f1d.crt: Your certificate
Source: https://certs.godaddy.com/anonymous/repository.pki
You can use openssl's x509 subcommand:
openssl x509 -subject -issuer -noout -in cert.pem
and check the output. Should be self explanatory.
An example:
$ openssl x509 -noout -issuer -subject -in gd-class2-root.crt
issuer= /C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
subject= /C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
$ openssl x509 -noout -issuer -subject -in gd_intermediate.crt
issuer= /C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
subject= /C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287
You can also verify the chain of trust:
$ openssl verify -CAfile gd-class2-root.crt gd_intermediate.crt
gd_intermediate.crt: OK
So the problem was several mistakes along the way for me. First, I took the -----BEGIN CERTIFICATE----- section from the PEM generated from my keytool keystore. Second, I was trying to convert the gd_bundle-g2-g1.crt file - it already contained exactly what I needed to use.
To start from the beginning - I used Digicert's Java Keytool to generate my commands to get my keystore and CSR using keytool. From there, I got a wildcard SSL certificate through GoDaddy and downloaded my certificate which was in a ZIP file along with gdig.crt and gd_bundle-g2-g1.crt. After this, I follwed to steps to get the private key from my keystore following this StackOverflow answer. However, the foo.pem file from this command required one more command, openssl rsa -in foo.pem -out foo.rsa to get the final form accepted by the AWS panel.
Now to fill in the SSL form on AWS:
- Private Key: The contents of the
foo.rsafile from the previous step. - Public Key Certificate: The contents of the
<your_cert>.crtfile provided by GoDaddy - Certificate Chain: The contents of the
gd_bundle-g2-g1.crtfile provided by GoDaddy
This has given me a successful SSL certificate setup for my AWS ELB, with the proper certificate path, giving me a trusted certificate.
It's not a trivial process, and the documentation isn't great.
This version of the process using Gandi.net SSL certificates might help you work though it, it's much better than the official docs
http://lexical.scopely.com/2015/03/11/uploading-an-ssl-cert-from-gandi-net-to-iam/
If can help someone.Tomcat 8
You don't need the xxxx.crt.pem file. Just run the following command on your original version of the keystore file (if renew certificate) for new certificate just use the same keystore file you've just create to get the csr.
So after you receive your zip file from Goddady type the following command.
keytool -import -alias root -keystore tomcat.keystore -trustcacerts -file gd_bundle-g2-g1.crt
keytool -import -alias tomcat -keystore tomcat.keystore -trustcacerts -file 123456fgscd.crt
sudo initctl restart tomcat
Don't forget to setup Catalina to point to your keystore (server.xml file)
Bingo.
You will need to have your existing keystore which contains your private key (and provisional certificate). If you've lost that, you'll need to start over again by generating a new private key, cert, and CSR,and sent it to your CA for a replacement.
Then, import the certificates you received from your CA (GoDaddy) using this command each time:
$ keytool -importcert -trustcacerts -keystore [yourstore.jks] \
-alias [certname] < [certificate].crt
Import the certs in the order in which GoDaddy suggested. You may want to make a copy of your keystore before you begin, just in case you break everything.