【问题标题】:OpenLDAP SSL CerificatesOpenLDAP SSL 证书
【发布时间】:2015-08-17 19:28:31
【问题描述】:

我正在尝试在 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

非常感谢任何帮助!

【问题讨论】:

    标签: ssl ldap openldap


    【解决方案1】:

    我已经找到了问题所在,它有两个问题。

    首先,我应该使用 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
    

    【讨论】:

      【解决方案2】:

      还要确保 openldap 用户可以访问目录/文件

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-11-06
        • 1970-01-01
        • 2018-08-23
        • 2017-06-13
        • 2019-03-29
        • 2014-01-05
        • 2013-01-25
        相关资源
        最近更新 更多