From f2d0aa7d2294eaf1d85eaaeb68fd7fd8433207ec Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 21 Jan 2016 18:01:17 +0000 Subject: [PATCH] ITS#8353 partial fixes ERR_remove_state() is deprecated since OpenSSL 1.0.0 Use X509_NAME_ENTRY_get_object() instead of direct access. --- libraries/libldap/tls_o.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c index 5d2367c6c1..e3379efd4c 100644 --- a/libraries/libldap/tls_o.c +++ b/libraries/libldap/tls_o.c @@ -164,7 +164,11 @@ tlso_destroy( void ) struct ldapoptions *lo = LDAP_INT_GLOBAL_OPT(); EVP_cleanup(); +#if OPENSSL_VERSION_NUMBER < 0x10000000 ERR_remove_state(0); +#else + ERR_remove_thread_state(NULL); +#endif ERR_free_strings(); if ( lo->ldo_tls_randfile ) { @@ -630,7 +634,7 @@ tlso_session_chkhost( LDAP *ld, tls_session *sess, const char *name_in ) navas = X509_NAME_entry_count( xn ); for ( i=navas-1; i>=0; i-- ) { ne = X509_NAME_get_entry( xn, i ); - if ( !OBJ_cmp( ne->object, obj )) { + if ( !OBJ_cmp( X509_NAME_ENTRY_get_object(ne), obj )) { cn = X509_NAME_ENTRY_get_data( ne ); break; } -- 2.39.5