One of the features that OpenShift Online has is the chance to use your own SSL certificates for new application aliases. The main purpose to use your own self-signed certificates in your application aliases is to identify and provide who is the owner of the website. If you want to know more, please visit the following link: https://www.openshift.com/blogs/domain-names-and-ssl-in-the-openshift-web-console.
Creating the SSL certificate
Executing this command you will create two certificates:
- The SSL certificate: cert.pem.
- The private key certificate: key.pem.
I used 3650 days (10 years) for certificate validity and random information for educational purposes. Use your own information and FQDN for your OpenShift Online application alias.
### Uploading the certificate Once you have generated your self-signed certificate, you must uploaded to your OpenShift Online application. You have two ways:
- Using the OpenShift Online web UI
- Using the command line tool rhc. If you use the web UI, go to your application, click on the alias which you want to upload the new certificates and the following dialog will appear:
Upload your certificates and press “Save“.
On the other hand, if you use the rhc command (the method I prefer to use), you must execute the following command:
### Check if the certificate works Execute the following command to check if the new SSL certificate has been uploaded and assigned successfuly:
If you see the “Has Certificate?” colum with a ‘yes’ status, you have successfuly uploaded your SSL self-signed certificate.