title: ssl certificate installation on play framework
body: <p>I am trying to create a new certificate for my <strong>scala play framework</strong> on <strong>ubuntu</strong> 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.</p>
  
  <p>First I'm creating my private key using command</p>
  
  <pre><code>keytool -genkey -alias tomcat -keyalg RSA -keystore tomcat.keystore
  </code></pre>
  
  <p>Then I generate my CSR</p>
  
  <pre><code>keytool -certreq -keyalg RSA -alias tomcat -file my-csr-file.csr -keystore tomcat.keystore
  </code></pre>
  
  <p>copy and paste the generated CSR into godady </p>
  
  <p>select the tomcat server on godaddy and received godaddy new certification.
  I got 3 files:</p>
  
  <pre><code>28042ad1aadd20.crt
  gd_bundle-g2-g1.crt
  gdig2.crt
  </code></pre>
  
  <p>Installing Root and Intermediate Certificates</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Second intermediate (gd_intermediate.crt):</p>
  
  <pre><code>wget https://certs.godaddy.com/repository/gd_intermediate.crt –no-check-certificate
  keytool -import -alias intermed -keystore tomcat.keystore -trustcacerts -file gd_intermediate.crt
  </code></pre>
  
  <p>Installing SSL Certificate</p>
  
  <pre><code>keytool -import -alias tomcat -keystore tomcat.keystore -trustcacerts -file my-csr-file.csr
  </code></pre>
  
  <p>Here I receive the following error</p>
  
  <pre><code>keytool error: java.security.cert.CertificateParsingException: java.io.IOException: ObjectIdentifier() -- data isn't an object ID (tag = 49)
  </code></pre>
  
  <p>Anyone recognize the problem?
  or any other way to install godaddy ssl certificate for tomcat server on ubuntu</p>