Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
9e829b6e
Commit
9e829b6e
authored
Feb 04, 2009
by
Quanah Gibson-Mount
Browse files
ITS#5920
parent
095cf801
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/tls2.c
View file @
9e829b6e
...
...
@@ -42,6 +42,8 @@
#endif
static
tls_impl
*
tls_imp
=
&
ldap_int_tls_impl
;
#define HAS_TLS( sb ) ber_sockbuf_ctrl( sb, LBER_SB_OPT_HAS_IO, \
(void *)tls_imp->ti_sbio )
#endif
/* HAVE_TLS */
...
...
@@ -329,8 +331,9 @@ ldap_int_tls_connect( LDAP *ld, LDAPConn *conn )
int
err
;
tls_session
*
ssl
=
NULL
;
ber_sockbuf_ctrl
(
sb
,
LBER_SB_OPT_GET_SSL
,
(
void
*
)
&
ssl
);
if
(
!
ssl
)
{
if
(
HAS_TLS
(
sb
))
{
ber_sockbuf_ctrl
(
sb
,
LBER_SB_OPT_GET_SSL
,
(
void
*
)
&
ssl
);
}
else
{
struct
ldapoptions
*
lo
;
tls_ctx
*
ctx
;
...
...
@@ -410,8 +413,9 @@ ldap_pvt_tls_accept( Sockbuf *sb, void *ctx_arg )
int
err
;
tls_session
*
ssl
=
NULL
;
ber_sockbuf_ctrl
(
sb
,
LBER_SB_OPT_GET_SSL
,
(
void
*
)
&
ssl
);
if
(
!
ssl
)
{
if
(
HAS_TLS
(
sb
))
{
ber_sockbuf_ctrl
(
sb
,
LBER_SB_OPT_GET_SSL
,
(
void
*
)
&
ssl
);
}
else
{
ssl
=
alloc_handle
(
ctx_arg
,
1
);
if
(
ssl
==
NULL
)
return
-
1
;
...
...
@@ -451,10 +455,7 @@ ldap_pvt_tls_accept( Sockbuf *sb, void *ctx_arg )
int
ldap_pvt_tls_inplace
(
Sockbuf
*
sb
)
{
tls_session
*
ssl
=
NULL
;
ber_sockbuf_ctrl
(
sb
,
LBER_SB_OPT_GET_SSL
,
(
void
*
)
&
ssl
);
return
ssl
!=
NULL
;
return
HAS_TLS
(
sb
)
?
1
:
0
;
}
int
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment