Ce contenu n'est pas disponible dans la langue sélectionnée.
E.2. Creating an SSL Certificate
The following procedure creates an SSL certificate and signs it with the CA key. SSL/TLS certificates provide a layer of security for accessing your installation over HTTPS. This procedure provides instructions for creating certificates and configuring the server with them.
openssl
. To install this tool, run the following command on your server:
#yum install openssl
#yum install openssl
Procedure E.2. Creating an SSL Certificate
- Create a key for your server:
#openssl genrsa -out ssl.key
#openssl genrsa -out ssl.key
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This creates anssl.key
file. - Use the key to create a signing request for your certificate:
#openssl req -new -key ssl.key -out ssl.csr
#openssl req -new -key ssl.key -out ssl.csr
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The signing request asks for some organization details to form the Distinguished Name (DN) in your certificate.Copy to Clipboard Copied! Toggle word wrap Toggle overflow This creates anssl.csr
signing request file. - Create the signed SSL certificate:
Create the signed SSL certificate:
Create the signed SSL certificate:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow openssl
asks for your CA key's password.This creates a certificate file namedssl.crt
.
Important
Procedure E.3. Resolving this error
- Create the index.txt file.
#touch /etc/pki/CA/index.txt
#touch /etc/pki/CA/index.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a serial file to label the CA and all subsequent certificates.
#echo '1000' > /etc/pki/CA/serial
#echo '1000' > /etc/pki/CA/serial
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
#openssl ca -cert ca.crt -keyfile ca.key -out ssl.crt -infiles ssl.csr
#openssl ca -cert ca.crt -keyfile ca.key -out ssl.crt -infiles ssl.csr
ssl.crt
and ssl.key
form the certificate pair that your server uses to encrypt data via HTTPS.
You have created an SSL certificate and signed it with the CA key. openssl
creates two files: ca.key
, which is a key that administrators use to sign certificates, and ca.crt
, which is the public CA certificate that users obtain to verify the validity of signed certificates they receive. Make sure users accessing your server have a copy of the ca.crt
so that they can import it into their client's trusted CA store.