diff -Naur openldap-2.4.33-1/libraries/libldap/tls_g.c openldap-2.4.33/libraries/libldap/tls_g.c --- openldap-2.4.33-1/libraries/libldap/tls_g.c 2012-10-10 12:18:49.000000000 +0000 +++ openldap-2.4.33/libraries/libldap/tls_g.c 2012-11-17 19:18:06.000000000 +0000 @@ -371,7 +371,11 @@ gnutls_x509_crt_t *cas; unsigned int i, j, ncas; +#if GNUTLS_VERSION_MAJOR == 2 gnutls_certificate_get_x509_cas( ctx->cred, &cas, &ncas ); +#elif GNUTLS_VERSION_MAJOR == 3 + gnutls_certificate_get_issuer( ctx->cred, &cas, &ncas, 0 ); +#endif for ( i = 1; i