From 4a23c086784a5e62c473a7b51d14ecddd0bc2318 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 22 Jun 2001 21:01:04 +0000 Subject: [PATCH] Fix up error handling --- libraries/libldap/tls.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.39.5