Diff for /libraries/libldap/tls_o.c between versions 1.5.2.9 and 1.5.2.11

version 1.5.2.9, 2009/10/30 17:48:17 version 1.5.2.11, 2010/04/13 20:23:01
Line 1 Line 1
 /* tls_o.c - Handle tls/ssl using OpenSSL */  /* tls_o.c - Handle tls/ssl using OpenSSL */
 /* $OpenLDAP$ */  /* $OpenLDAP: pkg/ldap/libraries/libldap/tls_o.c,v 1.5.2.10 2009/10/30 17:55:19 quanah 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-2009 The OpenLDAP Foundation.   * Copyright 2008-2010 The OpenLDAP Foundation.
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
Line 1081  tlso_tmp_rsa_cb( SSL *ssl, int is_export Line 1081  tlso_tmp_rsa_cb( SSL *ssl, int is_export
         /* FIXME:  Who frees the key? */          /* FIXME:  Who frees the key? */
 #if OPENSSL_VERSION_NUMBER > 0x00908000  #if OPENSSL_VERSION_NUMBER > 0x00908000
         BIGNUM *bn = BN_new();          BIGNUM *bn = BN_new();
           tmp_rsa = NULL;
         if ( bn ) {          if ( bn ) {
                 if ( BN_set_word( bn, RSA_F4 )) {                  if ( BN_set_word( bn, RSA_F4 )) {
                         tmp_rsa = RSA_new();                          tmp_rsa = RSA_new();
Line 1090  tlso_tmp_rsa_cb( SSL *ssl, int is_export Line 1091  tlso_tmp_rsa_cb( SSL *ssl, int is_export
                         }                          }
                 }                  }
                 BN_free( bn );                  BN_free( bn );
         } else {  
                 tmp_rsa = NULL;  
         }          }
 #else  #else
         tmp_rsa = RSA_generate_key( key_length, RSA_F4, NULL, NULL );          tmp_rsa = RSA_generate_key( key_length, RSA_F4, NULL, NULL );
Line 1101  tlso_tmp_rsa_cb( SSL *ssl, int is_export Line 1100  tlso_tmp_rsa_cb( SSL *ssl, int is_export
                 Debug( LDAP_DEBUG_ANY,                  Debug( LDAP_DEBUG_ANY,
                         "TLS: Failed to generate temporary %d-bit %s RSA key\n",                          "TLS: Failed to generate temporary %d-bit %s RSA key\n",
                         key_length, is_export ? "export" : "domestic", 0 );                          key_length, is_export ? "export" : "domestic", 0 );
                 return NULL;  
         }          }
         return tmp_rsa;          return tmp_rsa;
 }  }

Removed from v.1.5.2.9  
changed lines
  Added in v.1.5.2.11


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