This section demonstrates how to create a certificate for an SSL-enabled LDAP server.
Create a request configuration file:
# cp /etc/ssl/openssl_server_req.template /etc/ssl/ldap_req.cnf
Change the following property in the [req] section:
default_keyfile = /etc/ssl/private/ldap_key.pem
Change the following properties in the [req_distinguished_name] section:
commonName = ldap.intra.net emailAddress = ldap.admin@joe.org
Change the [altdns] section to add alternative names for the server (in case it has them):
DNS.1 = joesmachine.hisisp.net DNS.2 = server1.intra.net DNS.3 = ldap.joe.org DNS.4 = localhost IP.1 = 192.168.120.30 IP.2 = 163.61.64.62 IP.3 = 127.0.0.1
Generate the certificate request:
# cd # openssl req -config /etc/ssl/ldap_req.cnf -newkey rsa:2048 -out ldapreq.pem -outform PEM # chmod 400 /etc/ssl/private/ldap_key.pem