~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to libraries/libldap/tls2.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-07-28 10:17:15 UTC
  • mto: (0.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20090728101715-g0isvetelfeqm48k
Tags: upstream-2.4.17
ImportĀ upstreamĀ versionĀ 2.4.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* tls.c - Handle tls/ssl. */
2
 
/* $OpenLDAP: pkg/ldap/libraries/libldap/tls2.c,v 1.4.2.6 2009/02/17 20:47:40 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/libraries/libldap/tls2.c,v 1.4.2.8 2009/05/01 19:39:03 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
5
 * Copyright 1998-2009 The OpenLDAP Foundation.
434
434
 
435
435
        if ( err < 0 )
436
436
        {
437
 
                char buf[256];
438
437
                if ( update_flags( sb, ssl, err )) return 1;
439
438
 
440
 
                Debug( LDAP_DEBUG_ANY,"TLS: can't accept: %s.\n",
441
 
                        tls_imp->ti_session_errmsg( err, buf, sizeof(buf) ),0,0 );
 
439
                if ( DebugTest( LDAP_DEBUG_ANY ) ) {
 
440
                        char buf[256], *msg;
 
441
                        msg = tls_imp->ti_session_errmsg( err, buf, sizeof(buf) );
 
442
                        Debug( LDAP_DEBUG_ANY,"TLS: can't accept: %s.\n",
 
443
                                msg ? msg : "(unknown)", 0, 0 );
 
444
                }
442
445
 
443
446
                ber_sockbuf_remove_io( sb, tls_imp->ti_sbio,
444
447
                        LBER_SBIOD_LEVEL_TRANSPORT );
872
875
        struct berval der_dn;
873
876
        int rc;
874
877
 
875
 
        tls_imp->ti_session_my_dn( session, &der_dn );
876
 
        rc = ldap_X509dn2bv(&der_dn, dn, (LDAPDN_rewrite_func *)func, flags );
 
878
        rc = tls_imp->ti_session_my_dn( session, &der_dn );
 
879
        if ( rc == LDAP_SUCCESS )
 
880
                rc = ldap_X509dn2bv(&der_dn, dn, (LDAPDN_rewrite_func *)func, flags );
877
881
        return rc;
878
882
}
879
883
#endif /* HAVE_TLS */