Forum archive
How to import existing PEM SSL certificate to Tomcat Turnkey applaince
Hi Everybody,
I'm strugleling trying to make an existing ssl certificate works with the Turnkey tomcat appliance.
In My case, i'm using Stand alone appliance.
Any help to acheve it ?
Regards,
There is some nuance I didn't cover in that blog (but probably should have). In the text based 'PEM' format, there are in fact 2 different specifications that apply; PKCS#1 (defined by RFC 3447) and PKCS#8 (defined by RFC 5208).
Your current file, whilst in PEM format, is using the PKS#1 standard (the "RSA" in the "PRIVATE KEY" string gives that away). So if you wish to "drop it in" and replace the default certificate (and have it work with Tomcat, Webmin and Webshell) then you'll need the key in PKCS#8 format.
I don't have a file in that format currently, so I can't tell you 100% right now, but if you pull your file apart (the PEM format is plain text so you can use a commandline Linux text editor, such as vim or nano and copy/paste into a new file) with the key on it's own, let's call it 'pkcs1.key' the file should look like this:
(where the '[ ... ]' represents the string of random characters that constitiutes the key).
Then use openssl to convert to a PKCS#8 key like this:
The contents of the new 'cert.key' file should now be:
If you then follow the instructions from the bottom part of that blog post, you should be good... Please let me know how you go.