Generating a self-signed certificate using OpenSSL
OpenSSL is an open source implementation of the SSL and TLS protocols. It provides an encryption transport layer on top of the normal communications layer, allowing it to be intertwined with many network applications and services.
Before you begin
About this task
The default TLS Profile in the Cloud Manager has a generic Common Name. When associating an SSL profile to a Gateway Cluster, if using the default TLS Profile, your application making API calls might fail to verify the host name it is connecting to against the certificate presented.
In this case, you can generate a new self-signed certificate that represents a Common Name your application can validate. This topic tells you how to generate self-signed SSL certificate requests using the OpenSSL toolkit to enable HTTPS connections.
To generate a self-signed SSL certificate using the OpenSSL, complete the following steps:
Write down the Common Name (CN) for your SSL Certificate. The CN is the fully qualified name
for the system that uses the certificate. If you are using Dynamic DNS, your CN should have a
wild-card, for example:
*.api.com.Otherwise, use the hostname or IP address set in your Gateway Cluster (for example.
Run the following OpenSSL command to generate your private key and public certificate. Answer
the questions and enter the Common Name when prompted.
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem
Review the created certificate:
openssl x509 -text -noout -in certificate.pem
Combine your key and certificate in a PKCS#12 (P12) bundle:
openssl pkcs12 -inkey key.pem -in certificate.pem -export -out certificate.p12
Validate your P2 file.
openssl pkcs12 -in certificate.p12 -noout -info
- In the Cloud Manager, click TLS Profiles.
- Click Add, and enter values in the Display Name, Name, and optionally, Description fields.
- In the Present Certificate section, click the Upload Certificate icon .
Click Select File, browse for the certificate file that you want to present for authentication, and click Open.
- API Connect supports only the P12 (PKCS12) format file for the present certificate.
- Your P12 file must contain the private key, the public certificate from the Certificate Authority, and all intermediate certificates used for signing.
- Your P12 file can contain a maximum of 10 intermediate certificates.
In the Password text field, enter the password for the certificate file.
Note: The present certificate must be password protected.
The certificate is populated.
- To validate the certificate, move the Request and validate the certificate against the supplied CAs in the truststore slider to the On position.
- In the Trust Store section, click the Upload Certificate icon .
- Click Select File, browse for the certificate file that you want to present for authentication, and click Open.
- In the Password text field, enter the password for the certificate file.
The certificate is populated.
- Expand the Protocols section to display the SSL and TLS versions.
- Use the check boxes to indicate the SSL or TLS version.
- Click Save.
- In the Cloud Manager, click Services.
- In the Gateway Services pane, click the Service Settings icon .
- In the TLS Profile field, select the required profile, then click Save Service.