@@ -987,17 +987,6 @@ PHP_FUNCTION(ldap_connect)
987
987
snprintf ( url , urllen , "ldap://%s:" ZEND_LONG_FMT , host , port );
988
988
}
989
989
990
- #ifdef LDAP_OPT_X_TLS_NEWCTX
991
- if (url && !strncmp (url , "ldaps:" , 6 )) {
992
- int val = 0 ;
993
-
994
- /* ensure all pending TLS options are applied in a new context */
995
- if (ldap_set_option (NULL , LDAP_OPT_X_TLS_NEWCTX , & val ) != LDAP_OPT_SUCCESS ) {
996
- php_error_docref (NULL , E_WARNING , "Could not create new security context" );
997
- }
998
- }
999
- #endif
1000
-
1001
990
#ifdef LDAP_API_FEATURE_X_OPENLDAP
1002
991
/* ldap_init() is deprecated, use ldap_initialize() instead.
1003
992
*/
@@ -3707,17 +3696,6 @@ PHP_FUNCTION(ldap_start_tls)
3707
3696
ld = Z_LDAP_LINK_P (link );
3708
3697
VERIFY_LDAP_LINK_CONNECTED (ld );
3709
3698
3710
- #ifdef LDAP_OPT_X_TLS_NEWCTX
3711
- {
3712
- int val = 0 ;
3713
-
3714
- /* ensure all pending TLS options are applied in a new context */
3715
- if (ldap_set_option (ld -> link , LDAP_OPT_X_TLS_NEWCTX , & val ) != LDAP_OPT_SUCCESS ) {
3716
- php_error_docref (NULL , E_WARNING , "Could not create new security context" );
3717
- }
3718
- }
3719
- #endif
3720
-
3721
3699
if (((rc = ldap_set_option (ld -> link , LDAP_OPT_PROTOCOL_VERSION , & protocol )) != LDAP_SUCCESS ) ||
3722
3700
((rc = ldap_start_tls_s (ld -> link , NULL , NULL )) != LDAP_SUCCESS )
3723
3701
) {
0 commit comments