[Date Prev][Date Next] [Chronological] [Thread] [Top]

TLS: private key mismatch Error (or problem)

Hi, I´m having problems configuring Openldap with TLS/SSL. First of
all, I´m trying to put a server certificate, so I create a certificate
with OpenSSL with the next line:

openssl req -newkey rsa:1024 -x509 -nodes -out ldapcert.pem -keyout
ldapcert.pem -days 365

After this, I configured my slapd.conf with the next lines (but
before, I copied ldapcert.pem to slapd.conf directory):

TLSCACertificateFile  ldapcert.pem
TLSCertificadteFile   ldapcert.pem
TLSCertificateKeyFile ldapcert.pem

And finally, I launched openldap: (slapd -d 1) and appears this error:

TLS: private key mismatch.
TLS: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no
certificate assigned ssl_lib.c:772
main: TLS init def ctx failed: -1
slapd shutdown: freeing system resources.
slapd stopped.
connections_destroy: nothing to destroy.

I saw the .pem archive and there is a RSA private key, so i don´t why
it happens.

I´ve looking a lot of forums but i haven´t found any answer to this.
I´m using Windows Openldap 2.2.19 (i think that´s not the problem, so
later i´ll move to Linux :) ).

Thanks for help, and sorry for my english.


PD: I also tried launch openldap with : slapd -d 1 -h "ldap:///
ldaps:///" but it doesn´t work.