From: Howard Chu Date: Wed, 25 Feb 2009 21:48:10 +0000 (+0000) Subject: ITS#5976 check for cert/DN X-Git-Tag: ACLCHECK_0~784 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e5e9191aebe35a5457df57eedeb07def59f88b63;p=openldap ITS#5976 check for cert/DN --- diff --git a/libraries/libldap/tls2.c b/libraries/libldap/tls2.c index 33ebd70631..642cc118eb 100644 --- a/libraries/libldap/tls2.c +++ b/libraries/libldap/tls2.c @@ -872,8 +872,9 @@ ldap_pvt_tls_get_my_dn( void *s, struct berval *dn, LDAPDN_rewrite_dummy *func, struct berval der_dn; int rc; - tls_imp->ti_session_my_dn( session, &der_dn ); - rc = ldap_X509dn2bv(&der_dn, dn, (LDAPDN_rewrite_func *)func, flags ); + rc = tls_imp->ti_session_my_dn( session, &der_dn ); + if ( rc == LDAP_SUCCESS ) + rc = ldap_X509dn2bv(&der_dn, dn, (LDAPDN_rewrite_func *)func, flags ); return rc; } #endif /* HAVE_TLS */