LDAP启用SSL/TLS
一、利用RedHat-idm-console控制台生成ssl证书请求文件
[root@station2 ~]#RedHat-idm-console
1、选择Manager Certificates后点击Request,生存证书请求文件
|
2、选择Request Certificaate manually后在Requestor information输入CA中心要求相关信息
#红色部分为CA中心定义的必须匹配的信息,其他为ldap服务器自身信息
3、在弹出对话框中输入Token Passwd(该密码为证书保护密码)的密码RedHat,输入密码后next,选择“save to file”
#save to file文件即位证书请求文件dirsrv.crt(文件名自己定义)
4、将证书请求文件dirsrv.csr发送给CA中心,并由CA中心生成证书
[root@station2 ~]# scp dirsrv.csr 192.168.32.31:/root/.
[email protected]'s password:
dirsrv.csr 100% 684 0.7KB/s 00:00
[root@server1 ~]# openssl ca -in dirsrv.csr -out dirsrv.crt
Using configuration from /etc/pki/tls/openssl.cnf
Enter pass phrase for /etc/pki/CA/private/my-ca.key:
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 7 (0x7)
Validity
Not Before: Apr 13 04:08:15 2011 GMT
Not After : Apr 12 04:08:15 2012 GMT
Subject:
countryName = CN
stateOrProvinceName = Beijing
organizationName = kvm,Inc.
organizationalUnitName = example.com
commonName = station2.example.com
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
F4:7A:1D:90:90:F2:AD:AF:F1:97:44:1B:23:C7:39:D0:B3:82:F5:D9
X509v3 Authority Key Identifier:
keyid:82:06:F6:4D:45:71:D8:0C:EC:14:DD:44:2C:CB:78:24:5E:9D:D0:C5
Certificate is to be certified until Apr 12 04:08:15 2012 GMT (365 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
#CA中心生成证书
[root@server1 ~]# scp dirsrv.crt 192.168.32.32:/root/.
[email protected]'s password:
dirsrv.crt 100% 3765 3.7KB/s 00:00
[root@server1 ~]# scp /etc/pki/CA/my-ca.crt dirsrv.crt 192.168.32.32:/root/.
[email protected]'s password:
my-ca.crt 100% 1533 1.5KB/s 00:00
#将证书和CA公钥发送给ldap服务器