我试图在CentOS 7上为我的OpenLDAP安装实施SSL,并且似乎无法在正确的字段中获得正确的证书。我对发行人的命名惯例感到有些困惑。我确定这是一个LDAP + SSL新手问题:)
自签名证书的命名如下
server.key
server.crt
server.csr
发行人已经向我提供了
AddTrustExternalCARoot.crt
SAAddTrustCA.crt
SADomainValidationSecureServerCA.crt
my_domain_name.crt
在我的mod_ssl.ldif中我有
dn: cn=config
changetype: modify
replace: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/openldap/certs/SADomainValidationSecureServerCA.crt
-
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/openldap/certs/AddTrustExternalCARoot.crt
-
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/openldap/certs/server.key
我已经尝试了几种这样的组合而没有成功。我确定它很简单,我可以忽略这里。运行时
# slapd -d -1
我得到以下输出,我确定这意味着坏的/不匹配的密钥
55d22d8e connection_get(15)
55d22d8e connection_get(15): got connid=1000
55d22d8e connection_read(15): checking for input on id=1000
ber_get_next
ldap_read: want=8, got=8
0000: 16 03 03 00 cf 01 00 00 ........
55d22d8e ber_get_next on fd 15 failed errno=34 (Numerical result out of range)
55d22d8e connection_read(15): input error=-2 id=1000, closing.
55d22d8e connection_closing: readying conn=1000 sd=15 for close
非常感谢任何帮助!
答案 0 :(得分:0)
我已经弄明白了这个问题,已经两次了。
首先,我应该使用TLS而不是SSL
其次,正确的设置是:
dn: cn=config
changetype: modify
replace: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/openldap/certs/SecureServerCA.crt
-
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/openldap/certs/mydomain.crt
-
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/openldap/certs/server.key
答案 1 :(得分:0)
还要确保openldap用户可以访问目录/ files