Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Christopher Ng
OpenLDAP
Commits
9184c3a1
Commit
9184c3a1
authored
21 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Fix linking --with-cyrus-sasl and --without-tls
parent
6b046ced
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/libldap/tls.c
+49
-39
49 additions, 39 deletions
libraries/libldap/tls.c
with
49 additions
and
39 deletions
libraries/libldap/tls.c
+
49
−
39
View file @
9184c3a1
...
...
@@ -858,45 +858,6 @@ ldap_pvt_tls_inplace ( Sockbuf *sb )
return
HAS_TLS
(
sb
)
?
1
:
0
;
}
void
*
ldap_pvt_tls_sb_ctx
(
Sockbuf
*
sb
)
{
void
*
p
;
if
(
HAS_TLS
(
sb
))
{
ber_sockbuf_ctrl
(
sb
,
LBER_SB_OPT_GET_SSL
,
(
void
*
)
&
p
);
return
p
;
}
return
NULL
;
}
int
ldap_pvt_tls_get_strength
(
void
*
s
)
{
SSL_CIPHER
*
c
;
c
=
SSL_get_current_cipher
((
SSL
*
)
s
);
return
SSL_CIPHER_get_bits
(
c
,
NULL
);
}
int
ldap_pvt_tls_get_my_dn
(
void
*
s
,
struct
berval
*
dn
,
LDAPDN_rewrite_dummy
*
func
,
unsigned
flags
)
{
X509
*
x
;
X509_NAME
*
xn
;
int
rc
;
x
=
SSL_get_certificate
((
SSL
*
)
s
);
if
(
!
x
)
return
LDAP_INVALID_CREDENTIALS
;
xn
=
X509_get_subject_name
(
x
);
rc
=
ldap_X509dn2bv
(
xn
,
dn
,
(
LDAPDN_rewrite_func
*
)
func
,
flags
);
return
rc
;
}
static
X509
*
tls_get_cert
(
SSL
*
s
)
{
...
...
@@ -1692,6 +1653,55 @@ tls_tmp_dh_cb( SSL *ssl, int is_export, int key_length )
#endif
#endif
void
*
ldap_pvt_tls_sb_ctx
(
Sockbuf
*
sb
)
{
#ifdef HAVE_TLS
void
*
p
;
if
(
HAS_TLS
(
sb
))
{
ber_sockbuf_ctrl
(
sb
,
LBER_SB_OPT_GET_SSL
,
(
void
*
)
&
p
);
return
p
;
}
#endif
return
NULL
;
}
int
ldap_pvt_tls_get_strength
(
void
*
s
)
{
#ifdef HAVE_TLS
SSL_CIPHER
*
c
;
c
=
SSL_get_current_cipher
((
SSL
*
)
s
);
return
SSL_CIPHER_get_bits
(
c
,
NULL
);
#else
return
0
;
#endif
}
int
ldap_pvt_tls_get_my_dn
(
void
*
s
,
struct
berval
*
dn
,
LDAPDN_rewrite_dummy
*
func
,
unsigned
flags
)
{
#ifdef HAVE_TLS
X509
*
x
;
X509_NAME
*
xn
;
int
rc
;
x
=
SSL_get_certificate
((
SSL
*
)
s
);
if
(
!
x
)
return
LDAP_INVALID_CREDENTIALS
;
xn
=
X509_get_subject_name
(
x
);
rc
=
ldap_X509dn2bv
(
xn
,
dn
,
(
LDAPDN_rewrite_func
*
)
func
,
flags
);
return
rc
;
#else
return
LDAP_NOT_SUPPORTED
;
#endif
}
int
ldap_start_tls_s
(
LDAP
*
ld
,
LDAPControl
**
serverctrls
,
...
...
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