我在CentOS7上运行的openldap-servers-2.4.39-3.el7.x86_64的标准scheme中添加了特定的证书到userCertificate属性(DER编码证书)
Slapd使用:
include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema
我使用Apache Dir Studio(最新版本:2.0.0.v20130628,于2015.07.30)
然后,我将Load cert加载到userCertificate属性中,它显示了所有的证书字段,但是我按下了OK LDAP返回错误:
#!ERROR [LDAP: error code 21 - userCertificate;binary: value #0 normalization failed]
命令:
openssl x509 -in ./shit_cert.cer -inform DER -text
工作好,没有错误。
来自此CA的其他证书可以加载到这个salpd userCertificate属性中。
顺便说一句,这是俄罗斯Crypto-Pro CA( http://www.cryptopro.ru/products/ca )证书,我想这个特定的有一些X509扩展。
来自此CA的其他证书正确加载。
可以帮助你如何解决这个问题
PS
如果我使用命令行加载证书获得类似的错误
cat ./cer.ldif dn: cn=anisimov,o=000,dc=aaa,dc=bbb changetype: modify add: userCertificate;binary userCertificate;binary:< file:///root/wrong_certs/shit_cert.cer # ldapmodify -v -x -W -D "cn=Manager,dc=aaa,dc=bbb" -f ./cer.ldif ldap_initialize( <DEFAULT> ) Enter LDAP Password: add userCertificate;binary: NOT ASCII (1831 bytes) modifying entry "cn=anisimov,o=000,dc=aaa,dc=bbb" ldap_modify: Invalid syntax (21) additional info: userCertificate;binary: value #0 normalization failed
slapd.conf文件中的slap LogLevel -1告诉我以下内容:
авг 03 14:33:36 centos7.000.ru slapd[13909]: conn=1000 op=13 MOD dn="cn=anisimov,o=000,dc=aaa,dc=bbb" авг 03 14:33:36 centos7.000.ru slapd[13909]: conn=1000 op=13 MOD attr=userCertificate;binary авг 03 14:33:36 centos7.000.ru slapd[13909]: <= str2entry NULL (ssyn_normalize 21) авг 03 14:33:36 centos7.000.ru slapd[13909]: conn=1000 op=13 RESULT tag=103 err=21 text=userCertificate;binary: value #0 normalization failed авг 03 14:33:36 centos7.000.ru slapd[13909]: conn=1000 op=14 SRCH base="cn=anisimov,o=000,dc=aaa,dc=bbb" scope=0 deref=3 filter="(objectClass=*)" авг 03 14:33:36 centos7.000.ru slapd[13909]: conn=1000 op=14 SRCH attr=* авг 03 14:33:36 centos7.000.ru slapd[13909]: conn=1000 op=14 SEARCH RESULT tag=101 err=0 nentries=1 text=