From: Kurt Zeilenga Date: Fri, 22 Jun 2001 21:01:04 +0000 (+0000) Subject: Fix up error handling X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1288 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4a23c086784a5e62c473a7b51d14ecddd0bc2318;p=openldap Fix up error handling --- diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index 4b0c02c753..b03b877e5a 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -137,7 +137,8 @@ ldap_pvt_tls_init_def_ctx( void ) tls_def_ctx = SSL_CTX_new( SSLv23_method() ); if ( tls_def_ctx == NULL ) { Debug( LDAP_DEBUG_ANY, - "TLS: could not allocate default ctx.\n",0,0,0); + "TLS: could not allocate default ctx (%d).\n", + ERR_peek_error(),0,0); goto error_exit; } if ( tls_opt_ciphersuite && @@ -943,7 +944,7 @@ ldap_pvt_tls_start ( LDAP *ld, Sockbuf *sb, void *ctx_arg ) if ( strcasecmp(ld->ld_host, peer_cert_cn) != 0 ) { Debug( LDAP_DEBUG_ANY, "TLS: hostname (%s) does not match " - "common name in certificate (%s).", + "common name in certificate (%s).\n", ld->ld_host, peer_cert_cn, 0 ); LDAP_FREE( peer_cert_cn ); return LDAP_CONNECT_ERROR;