Diff for /libraries/libldap/tls_o.c between versions 1.17 and 1.18

version 1.17, 2010/04/13 20:17:57 version 1.18, 2010/12/06 10:31:59
Line 1 Line 1
 /* tls_o.c - Handle tls/ssl using OpenSSL */  /* tls_o.c - Handle tls/ssl using OpenSSL */
 /* $OpenLDAP: pkg/ldap/libraries/libldap/tls_o.c,v 1.16 2010/04/12 01:21:05 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/libraries/libldap/tls_o.c,v 1.17 2010/04/13 20:17:57 kurt Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 2008-2010 The OpenLDAP Foundation.   * Copyright 2008-2010 The OpenLDAP Foundation.
Line 37 Line 37
 #include "ldap-int.h"  #include "ldap-int.h"
 #include "ldap-tls.h"  #include "ldap-tls.h"
   
 #ifdef LDAP_R_COMPILE  
 #include <ldap_pvt_thread.h>  
 #endif  
   
 #ifdef HAVE_OPENSSL_SSL_H  #ifdef HAVE_OPENSSL_SSL_H
 #include <openssl/ssl.h>  #include <openssl/ssl.h>
 #include <openssl/x509v3.h>  #include <openssl/x509v3.h>
Line 1214  tlso_tmp_dh_cb( SSL *ssl, int is_export, Line 1210  tlso_tmp_dh_cb( SSL *ssl, int is_export,
         int i;          int i;
   
         /* Do we have params of this length already? */          /* Do we have params of this length already? */
 #ifdef LDAP_R_COMPILE          LDAP_MUTEX_LOCK( &tlso_dh_mutex );
         ldap_pvt_thread_mutex_lock( &tlso_dh_mutex );  
 #endif  
         for ( p = tlso_dhparams; p; p=p->next ) {          for ( p = tlso_dhparams; p; p=p->next ) {
                 if ( p->keylength == key_length ) {                  if ( p->keylength == key_length ) {
 #ifdef LDAP_R_COMPILE                          LDAP_MUTEX_UNLOCK( &tlso_dh_mutex );
                         ldap_pvt_thread_mutex_unlock( &tlso_dh_mutex );  
 #endif  
                         return p->param;                          return p->param;
                 }                  }
         }          }
Line 1254  tlso_tmp_dh_cb( SSL *ssl, int is_export, Line 1246  tlso_tmp_dh_cb( SSL *ssl, int is_export,
                 }                  }
         }          }
   
 #ifdef LDAP_R_COMPILE          LDAP_MUTEX_UNLOCK( &tlso_dh_mutex );
         ldap_pvt_thread_mutex_unlock( &tlso_dh_mutex );  
 #endif  
         return dh;          return dh;
 }  }
   

Removed from v.1.17  
changed lines
  Added in v.1.18


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org