Support for "server cert validation", and was looking for the API(s) that does
that, like would setting LDAP_OPT_X_TLS_CACERTFILE option (and/or combined with
LDAP_OPT_X_TLS_DEMAND), etc. It would be really nice to have a callback API to use your
own validation logic (to handle some special cases), maybe it already exists just I
There is no reason I would not believe anybody's answer, but "yes/no + digging
out the code yourself" obviously is not the answer I am looking for.
My in-memory setting API question is "if LDAP_OPT_X_TLS_CACERTFILE is the only way
provided to set the trusted CAs", then it would be better to have an alternative API
to set it with in-memory data (X509 etc), as it's less efficient to read the file
From: Aaron Richton [mailto:firstname.lastname@example.org]
Sent: Wednesday, September 24, 2014 10:08 AM
To: Bin Lu
Cc: Dieter Klünter; openldap-technical(a)openldap.org
Subject: RE: way to validate server certificate
On Tue, 23 Sep 2014, Bin Lu wrote:
I know how to do it using openssl lib functions. But I am looking for openldap support.
OpenLDAP support for what? You've talked about standards used for applications
verifying subject names, configuration of CAs, and opened an aside regarding in-memory CAs
Howard's told you what specs libldap implements, the support is there.
Read the code if you don't believe him.
configuring CAs/in-memory CAs:
The TLS library providers can tell you what each of their libraries implement. (And
it's most definitely not OpenLDAP's job to duplicate what the TLS libraries
already provide...) You can find the related libldap/slapd configuration directives in the
appropriate man pages. These are typically passed straight to the crypto libraries,
though, so a thorough understanding of your chosen crypto library is key. (Keep in mind
that OpenLDAP supports a compile-time choice of multiple crypto
[mailto:email@example.com] On Behalf Of Dieter
Sent: Monday, September 22, 2014 12:25 PM
Subject: Re: way to validate server certificate
Am Mon, 22 Sep 2014 17:51:02 +0000
schrieb Bin Lu <blu(a)paloaltonetworks.com>:
> Hi Howard,
> The RFCs specify the protocol, but not all releases implement the
> full protocol.
> I briefly went through the openLdap APIs but could not find the APIs
> to do server id check. LDAP_OPT_X_TLS_CACERTFILE and
> LDAP_OPT_X_TLS_CACERTDIR seem to be for server cert validation, but I
> don't see how it does the hostname matching.
> If would be helpful if somebody could point me the actual API(s) that
> does this.
That depends on the included TLS library, for openSSL you might want
> -----Original Message-----
> From: Howard Chu [mailto:firstname.lastname@example.org]
> Sent: Friday, September 19, 2014 8:10 PM
> To: Bin Lu; openldap-technical(a)openldap.org
> Subject: Re: way to validate server certificate
> Bin Lu wrote:
>> Does openldap provide APIs to do server certificate validation? Can
>> I retrieve the server cert from LDAP connection and do the
>> validation myself or by passing the trusted CA list openldap will do
>> it (in this case, how the hostname matching with the subject DN is
> OpenLDAP libldap does server certificate validation according to
> RFC2830 and 4513. It would be a mistake to duplicate that
> functionality and do the validation yourself.
>> Thanks a lot in advance,
Dieter Kl?nter | Systemberatung
GPG Key ID: E9ED159B