I am trying to create a new certificate for my scala play framework on ubuntu but I cannot import my key with keytool. I haven't been able to figure out what is causing it so I thought I'd see here if anyone recognizes my problem.
I first create my private key using
keytool -genkey -alias tomcat -keyalg RSA -keystore tomcat.keystore
Then I generate my CSR
keytool -certreq -keyalg RSA -alias tomcat -file my-csr-file.csr -keystore tomcat.keystore
copy and paste the generated CSR into godady
select the tomcat server on godaddy and i received godaddy new certification.i get 3 files:
28042ad1aadd20.crt
gd_bundle-g2-g1.crt
gdig2.crt
Installing Root and Intermediate Certificates
wget https://certs.godaddy.com/repository/valicert_class2_root.crt –no-check-certificate
keytool -import -alias root -keystore tomcat.keystore -trustcacerts -file valicert_class2_root.crt
wget https://certs.godaddy.com/repository/gd_cross_intermediate.crt –no-check-certificate
keytool -import -alias cross -keystore tomcat.keystore -trustcacerts -file gd_cross_intermediate.crt
Second intermediate (gd_intermediate.crt):
wget https://certs.godaddy.com/repository/gd_intermediate.crt –no-check-certificate
keytool -import -alias intermed -keystore tomcat.keystore -trustcacerts -file gd_intermediate.crt
Installing SSL Certificate
keytool -import -alias tomcat -keystore tomcat.keystore -trustcacerts -file my-csr-file.csr
Here I receive the following error
keytool error: java.security.cert.CertificateParsingException: java.io.IOException: ObjectIdentifier() -- data isn't an object ID (tag = 49)
Anyone recognize the problem? or any other way to install godaddy ssl certificate for tomcat server using ubuntu