LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2021, 03:18 AM   #1
shamijohn123
LQ Newbie
 
Registered: Apr 2021
Posts: 1

Rep: Reputation: Disabled
How to install SSL certificates on Tomcat in AWS Linux Infrastructure


could use a little help. I am taking an internship for AWS Certified DevOps Engineer - Professional in one of a company. I was pushed into a DevOps / sys-admin role in a 150 person business when our DevOps guy quit with a week's notice. Our internal company.org sites are down because our go daddy SSL certs expired. I am trying to restore everything and having a bit of trouble understanding the process everything is requiring here. We have an AWS infrastructure, couple DNS servers, tomcat, apache servers, etc. What I do know is that these renewed cert files from go daddy need to be imported into tomcat, then tomcat needs to be restarted. The servers are AWS Linux. I think how this all goes down is I take the 3 .crt files from GoDaddy, cat them into a .pem file, then using openssl export that and our private key to a p12(I’m sure it’s p12), then using keytool import that into tomcat. Then restart tomcat. This is where I’m at.

openssl pkcs12 -export -in company.pem -inkey /usr/local/bin/backups/privatekey.pem -out company.p12

No certificate matches private key
where company.pem is all the godaddy certs merged using cat. I found the private key using find.

Researching is giving me some conflicting information, so I am not understanding anything. I think maybe I must have to somehow export the private key into the .pem file by first decrypting it? I’m not even sure that’s the road I should take. Maybe I’m way off. Any sort of insight would be greatly appreciated. Thank you all.
 
Old 04-16-2021, 07:02 AM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,588

Rep: Reputation: 2542Reputation: 2542Reputation: 2542Reputation: 2542Reputation: 2542Reputation: 2542Reputation: 2542Reputation: 2542Reputation: 2542Reputation: 2542Reputation: 2542
Quote:
Originally Posted by shamijohn123 View Post
could use a little help. I am taking an internship for AWS Certified DevOps Engineer - Professional in one of a company. I was pushed into a DevOps / sys-admin role in a 150 person business when our DevOps guy quit with a week's notice. Our internal company.org sites are down because our go daddy SSL certs expired. I am trying to restore everything and having a bit of trouble understanding the process everything is requiring here.
Sounds like your company should consider hiring a consultant to help you and someone else understand the setup.

(A business that size with any piece of knowledge inside a single head is asking for trouble.)



Quote:
What I do know is that these renewed cert files from go daddy need to be imported into tomcat, then tomcat needs to be restarted. The servers are AWS Linux. I think how this all goes down is I take the 3 .crt files from GoDaddy, cat them into a .pem file, then using openssl export that and our private key to a p12(I’m sure it’s p12), then using keytool import that into tomcat. Then restart tomcat. This is where I’m at.

openssl pkcs12 -export -in company.pem -inkey /usr/local/bin/backups/privatekey.pem -out company.p12

No certificate matches private key
where company.pem is all the godaddy certs merged using cat.
I haven't done certs with Tomcat, and don't use GoDaddy for anything, but what I use for Jetty + Let's Encrypt is the following:
Code:
pkpass=p
storepass=storep

openssl pkcs12 -export \
 -inkey privkey.pem -in fullchain.pem \
 -out jetty.pkcs12 -passout "pass:$pkpass"

keytool -importkeystore -noprompt \
 -srckeystore jetty.pkcs12 -srcstoretype PKCS12 -srcstorepass "$pkpass" \
 -destkeystore keystore -deststorepass "$storepass"

The openssl command is equivalent to yours except for the passout param - which is needed because keytool can't handle files without passwords - but from memory the openssl command itself worked without it, so if that's where your error is, that suggests maybe your company.pem is not equivalent to the fullchain.pem which Let's Encrypt produces.

If GoDaddy doesn't provide an already-merged fullchain for you, there's probably a suitable guide somewhere, but if not then checking how Certbot combines them might help.

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Centaurus Infrastructure Project Joins Linux Foundation to Advance Cloud Infrastructure for 5G, AI and Edge LXer Syndicated Linux News 0 12-18-2020 03:13 AM
LXer: Manage your SSL certificates with the ssl-on-demand script LXer Syndicated Linux News 0 02-12-2020 07:13 PM
LXer: Understanding Public Key Infrastructure and X.509 Certificates LXer Syndicated Linux News 0 06-22-2019 07:35 PM
LXer: Manjaro Is Updating Its Infrastructure, Adopts Let’s Encrypt SSL Certificates LXer Syndicated Linux News 0 05-12-2016 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration