SSL – Amazon ELB Certificates

In: General|Linux

20 Jun 2015

I always forget the order to concatenate SSL certificates and to upload to Amazon ELBs as well as commands to verify SSL certificates.

Extract dates from certificate

echo | openssl s_client -connect 2>/dev/null | openssl x509 -noout -dates
notBefore=Feb 10 00:00:00 2015 GMT
notAfter=Jun  9 23:59:59 2016 GMT

cat 14619087repl_1.crt | openssl x509 -noout -dates

List DNS entries for SANs certificates

echo | openssl s_client -connect 2>/dev/null | openssl x509 -noout -text | grep DNS | sed -r 's/[ ]+DNS://g;s/,/\n/g'

Extract certificate

openssl x509 -inform PEM -in xxx.crt

Concatenation of SSL Certificates for Comodo

cat COMODORSAOrganizationValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt >> gd_bundle.crt;

Upload SSL certificates

aws iam upload-server-certificate \
    --server-certificate-name sans-photobox-com-intermediate-expires-09-06-2016-v2 \
    --certificate-body file://14619087repl_1.crt \
    --private-key file://../co.key \
    --certificate-chain file://gd_bundle.crt

Comment Form

About this blog

I have been a developer for roughly 10 years and have worked with an extensive range of technologies. Whilst working for relatively small companies, I have worked with all aspects of the development life cycle, which has given me a broad and in-depth experience.