extracting X509 certificate from LDAP connection with openldap public API