0

I have some difficulty to import our *.example.com certificate. I have the following files:

"<something>.crt" 
"<something>.csr" and 
"<something>.key". 

So what I need is to import this certificate in our stash atlassian service that is running on Tomcat. Any idea how to do this as I try any stuff with keytools etc.? We already have one certificate implemented but it reaches end of life.

0

First, you need to find where your Tomcat's keystore file is. This is usually configured via a <Connector> element in the Tomcat config, e.g.:

<Connector ...
  keystore="/path/to/keystore.jks"
</Connector>

Since you mentioned you already have an existing certificate that's about to expire, it suggests that you already do have a keystore configured like this.

So then, we need to import the certificate/key you have, into that keystore file. To do this, you first create a PKCS#12 file from your something.crt and something.key files, and then import that PKCS#12 file into your keystore file (e.g. /path/to/keystore.jks) using the keytool command; see https://stackoverflow.com/a/11954816/4072843 for examples of how to do this. (Note that your something.csr file is not needed for this; the .csr extension suggests that that file is the Certificate Signing Request file, which is how you requested that certificate from your CA; a CSR file is not, in itself, a full certificate.)

  • Hi Castaglia, thanks this was helpful and sorry for the delay. seems like it works but i guess now the problem lies on the my server. I can't configure ssl ( bitbucket ). I'm still trying to figure out where the problem is. – IvanAK Feb 22 '16 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.