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
542f3634
Commit
542f3634
authored
20 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Add ldap_start_tls() and ldap_install_tls() to provide async version
of ldap_start_tls_s().
parent
15102654
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ldap.h
+15
-0
15 additions, 0 deletions
include/ldap.h
libraries/libldap/tls.c
+28
-5
28 additions, 5 deletions
libraries/libldap/tls.c
with
43 additions
and
5 deletions
include/ldap.h
+
15
−
0
View file @
542f3634
...
...
@@ -1304,6 +1304,21 @@ ldap_initialize LDAP_P((
LDAP
**
ldp
,
LDAP_CONST
char
*
url
));
/*
* in tls.c
*/
LDAP_F
(
int
)
ldap_start_tls
LDAP_P
((
LDAP
*
ld
,
LDAPControl
**
serverctrls
,
LDAPControl
**
clientctrls
,
int
*
msgidp
));
LDAP_F
(
int
)
ldap_install_tls
LDAP_P
((
LDAP
*
ld
));
LDAP_F
(
int
)
ldap_start_tls_s
LDAP_P
((
LDAP
*
ld
,
...
...
This diff is collapsed.
Click to expand it.
libraries/libldap/tls.c
+
28
−
5
View file @
542f3634
...
...
@@ -1651,14 +1651,39 @@ ldap_pvt_tls_get_my_dn( void *s, struct berval *dn, LDAPDN_rewrite_dummy *func,
#endif
}
int
ldap_start_tls
(
LDAP
*
ld
,
LDAPControl
**
serverctrls
,
LDAPControl
**
clientctrls
,
int
*
msgidp
)
{
return
ldap_extended_operation
(
ld
,
LDAP_EXOP_START_TLS
,
NULL
,
serverctrls
,
clientctrls
,
msgidp
);
}
int
ldap_install_tls
(
LDAP
*
ld
)
{
#ifndef HAVE_TLS
return
LDAP_NOT_SUPPORTED
;
#else
if
(
ld
->
ld_sb
!=
NULL
&&
ldap_pvt_tls_inplace
(
ld
->
ld_sb
)
!=
0
)
{
return
LDAP_LOCAL_ERROR
;
}
return
ldap_int_tls_start
(
ld
,
ld
->
ld_defconn
,
NULL
);
#endif
}
int
ldap_start_tls_s
(
LDAP
*
ld
,
LDAPControl
**
serverctrls
,
LDAPControl
**
clientctrls
)
{
#ifndef HAVE_TLS
return
LDAP_NOT_SUPPORTED
;
#else
int
rc
;
#ifdef HAVE_TLS
char
*
rspoid
=
NULL
;
struct
berval
*
rspdata
=
NULL
;
...
...
@@ -1683,9 +1708,7 @@ ldap_start_tls_s ( LDAP *ld,
rc
=
ldap_int_tls_start
(
ld
,
ld
->
ld_defconn
,
NULL
);
}
#else
rc
=
LDAP_NOT_SUPPORTED
;
#endif
return
rc
;
#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