Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Lowden
OpenLDAP
Commits
ebf74c7b
Commit
ebf74c7b
authored
7 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
ITS#8353, ITS#8533 - Ensure that the deprecated API is not used when using OpenSSL 1.1 or later
parent
4cbd70ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/libldap/tls_o.c
+13
-8
13 additions, 8 deletions
libraries/libldap/tls_o.c
with
13 additions
and
8 deletions
libraries/libldap/tls_o.c
+
13
−
8
View file @
ebf74c7b
...
...
@@ -48,10 +48,7 @@
#endif
#if OPENSSL_VERSION_NUMBER >= 0x10100000
#define ERR_remove_thread_state(x)
/* deprecated, get rid of it */
#define ASN1_STRING_data(x) ASN1_STRING_get0_data(x)
#define CRYPTO_free(x) OPENSSL_free(x)
#define CRYPTO_NUM_LOCKS CRYPTO_num_locks()
#endif
typedef
SSL_CTX
tlso_ctx
;
...
...
@@ -64,11 +61,12 @@ static void tlso_report_error( void );
static
void
tlso_info_cb
(
const
SSL
*
ssl
,
int
where
,
int
ret
);
static
int
tlso_verify_cb
(
int
ok
,
X509_STORE_CTX
*
ctx
);
static
int
tlso_verify_ok
(
int
ok
,
X509_STORE_CTX
*
ctx
);
static
int
tlso_seed_PRNG
(
const
char
*
randfile
);
#if OPENSSL_VERSION_NUMBER < 0x10100000
/*
* OpenSSL 1.1 API and later has new locking code
*/
static
RSA
*
tlso_tmp_rsa_cb
(
SSL
*
ssl
,
int
is_export
,
int
key_length
);
#endif
static
int
tlso_seed_PRNG
(
const
char
*
randfile
);
#ifdef LDAP_R_COMPILE
/*
...
...
@@ -109,6 +107,7 @@ static void tlso_thr_init( void )
CRYPTO_set_id_callback
(
tlso_thread_self
);
}
#endif
/* LDAP_R_COMPILE */
#endif
/* OpenSSL 1.1 */
static
STACK_OF
(
X509_NAME
)
*
tlso_ca_list
(
char
*
bundle
,
char
*
dir
)
...
...
@@ -154,9 +153,13 @@ tlso_init( void )
(
void
)
tlso_seed_PRNG
(
lo
->
ldo_tls_randfile
);
#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000
SSL_load_error_strings
();
SSL_library_init
();
OpenSSL_add_all_digests
();
#else
OPENSSL_init_ssl
(
0
,
NULL
);
#endif
/* FIXME: mod_ssl does this */
X509V3_add_standard_extensions
();
...
...
@@ -172,6 +175,7 @@ tlso_destroy( void )
{
struct
ldapoptions
*
lo
=
LDAP_INT_GLOBAL_OPT
();
#if OPENSSL_VERSION_NUMBER < 0x10100000
EVP_cleanup
();
#if OPENSSL_VERSION_NUMBER < 0x10000000
ERR_remove_state
(
0
);
...
...
@@ -179,6 +183,7 @@ tlso_destroy( void )
ERR_remove_thread_state
(
NULL
);
#endif
ERR_free_strings
();
#endif
if
(
lo
->
ldo_tls_randfile
)
{
LDAP_FREE
(
lo
->
ldo_tls_randfile
);
...
...
@@ -1087,9 +1092,9 @@ tlso_verify_cb( int ok, X509_STORE_CTX *ctx )
certerr
,
0
,
0
);
}
if
(
sname
)
CRYPTO
_free
(
sname
);
OPENSSL
_free
(
sname
);
if
(
iname
)
CRYPTO
_free
(
iname
);
OPENSSL
_free
(
iname
);
#ifdef HAVE_EBCDIC
if
(
certerr
)
LDAP_FREE
(
certerr
);
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment