Monday, April 28, 2014

LDAP certificate check - how?

Newsgroup: comp.lang.c++

Subject: LDAP certificate check - how?

From: Torsten Mueller <muellerto@...>

Date: Mon, 28 Apr 2014 13:54:50 +0200



I know this topic is special and not many people have to face this. But

I have to.



I connect to an Active Directory server using LDAP (Wldap32.dll,

functions in Winldap.h) to request and modify some data.



The connection (SSL) allows certificate checks, one for the server's and

one for the client's certificate. I would a least implement the check of

the server's certificate. In LDAP there's a callback function which is

indeed called when I open the connection:



BOOLEAN _cdecl VerifyServerCert(PLDAP Connection, PCCERT_CONTEXT* ppServerCert)

{

// ...

return TRUE; // don't check, just accept the server certificate

}



But I have no idea where to begin with this. How should I start to

interpret this PCCERT_CONTEXT struct list? Could anyone give me a short

introduction into this?



Note: I don't want to use any additional library like OpenSSL for that.



T.M.







via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://ift.tt/1hKJ1Hj

View all the progranning help forums at:

http://ift.tt/1dP9txN

No comments:

Post a Comment