Full_Name: Amit Sinha Version: openldap-2.4.35 OS: Linux 2.6.18-308.11.1.el5 URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (72.163.217.105) When i compile and run the below code on linux 64 bit, it core dumps in ldap_start_tls_s(). #include <ldap.h> #include <iostream> using namespace std; int main() { char* hostname = "myhost.mydomain.com" ; LDAP* l=ldap_init(hostname,389); int version = LDAP_VERSION3 ; if( LDAP_SUCCESS != ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, "7")) { cout << "error LDAP_OPT_DEBUG_LEVEL" << endl ; } if( LDAP_SUCCESS != ldap_set_option(l, LDAP_OPT_PROTOCOL_VERSION, &version )) { cout << "error LDAP_OPT_PROTOCOL_VERSION\n" ; } if( LDAP_SUCCESS != ldap_set_option(l, LDAP_OPT_REFERRALS, LDAP_OPT_OFF)) { cout << "error LDAP_OPT_REFERRALS\n" ; } if( LDAP_SUCCESS != ldap_set_option( NULL,LDAP_OPT_X_TLS_CTX,NULL )) { cout << "error LDAP_OPT_X_TLS_CTX\n" ; } /if( LDAP_SUCCESS != ldap_set_option( NULL,LDAP_OPT_X_TLS_CACERTDIR,"/myDirOfCert")) { cout << "error LDAP_OPT_X_TLS_CACERTDIR\n" ; } int rc ; if( LDAP_SUCCESS != ( rc = ldap_start_tls_s(l, NULL, NULL)) ) { cout << "error ldap_start_tls_s:" << ldap_err2string(rc) << endl ; } } BACKTRACE: (gdb) bt #0 0x00002b7d266bbbff in sk_value () from /root/openssl/openssl-1.0.1e/libcrypto.so.1.0.0 #1 0x00002b7d264a62fe in ssl3_output_cert_chain () from /root/openssl/openssl-1.0.1e/libssl.so.1.0.0 #2 0x00002b7d2649fffd in ssl3_send_client_certificate () from /root/openssl/openssl-1.0.1e/libssl.so.1.0.0 #3 0x00002b7d264a0531 in ssl3_connect () from /root/openssl/openssl-1.0.1e/libssl.so.1.0.0 #4 0x00002b7d264a9487 in ssl23_connect () from /root/openssl/openssl-1.0.1e/libssl.so.1.0.0 #5 0x00002b7d263676ec in tlso_session_connect (ld=<value optimized out>, sess=0x0) at tls_o.c:363 #6 0x00002b7d2636698d in ldap_int_tls_connect (ld=0x3d44e80, conn=0x3d675f0, srv=<value optimized out>) at tls2.c:362 #7 ldap_int_tls_start (ld=0x3d44e80, conn=0x3d675f0, srv=<value optimized out>) at tls2.c:860 #8 0x00002b7d26366d35 in ldap_start_tls_s (ld=0x3d44e80, serverctrls=0x0, clientctrls=<value optimized out>) at tls2.c:1040 #9 0x0000000000400dd2 in main () The open ssl version i am using is openssl-1.0.1e
changed notes moved from Incoming to Software Bugs
--On Wednesday, June 26, 2013 6:20 AM +0000 a16474@gmail.com wrote: > Full_Name: Amit Sinha > Version: openldap-2.4.35 > OS: Linux 2.6.18-308.11.1.el5 > URL: ftp://ftp.openldap.org/incoming/ > Submission from: (NULL) (72.163.217.105) > > > When i compile and run the below code on linux 64 bit, it core dumps in > ldap_start_tls_s(). Hello, Thank you for the report! I apologize for the (very very long) delay in response. This issue no longer seems to occur with current OpenLDAP/OpenSSL releases (nor does it happen with OpenLDAP/GnuTLS). I believe one of the many fixes to OpenLDAP's TLS code has since resolved this issue. I tested with both OpenSSL 1.0.2k and 1.1.1b. This ITS will be closed. Warm regards, Quanah -- Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: <http://www.symas.com>
Fixed in a later release
changed notes changed state Open to Closed