From e5e9191aebe35a5457df57eedeb07def59f88b63 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 25 Feb 2009 21:48:10 +0000 Subject: [PATCH] ITS#5976 check for cert/DN --- libraries/libldap/tls2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 */ -- 2.39.5