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
Lukas However
OpenLDAP
Commits
1fadca54
Commit
1fadca54
authored
25 years ago
by
Mark Valence
Browse files
Options
Downloads
Patches
Plain Diff
Start TLS extended op routine.
parent
454284f1
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
servers/slapd/starttls.c
+63
-0
63 additions, 0 deletions
servers/slapd/starttls.c
with
63 additions
and
0 deletions
servers/slapd/starttls.c
0 → 100644
+
63
−
0
View file @
1fadca54
/* $OpenLDAP$ */
/*
* Copyright 1999 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
#include
"portable.h"
#include
<stdio.h>
#include
<ac/socket.h>
#include
"slap.h"
#ifdef HAVE_TLS
int
starttls_extop
(
SLAP_EXTOP_CALLBACK_FN
cb
,
Connection
*
conn
,
Operation
*
op
,
char
*
oid
,
struct
berval
*
reqdata
,
struct
berval
**
rspdata
,
char
**
text
)
{
/* can't start TLS if it is already started */
if
(
conn
->
c_is_tls
!=
0
)
return
(
LDAP_OPERATIONS_ERROR
);
/* can't start TLS if there are other op's around */
if
(
conn
->
c_ops
!=
NULL
)
{
if
(
conn
->
c_ops
!=
op
||
op
->
o_next
!=
NULL
)
return
(
LDAP_OPERATIONS_ERROR
);
}
if
(
conn
->
c_pending_ops
!=
NULL
)
{
if
(
conn
->
c_pending_ops
!=
op
||
op
->
o_next
!=
NULL
)
return
(
LDAP_OPERATIONS_ERROR
);
}
/* here's some pseudo-code if HAVE_TLS is defined
* but for some reason TLS is not available.
*/
/*
if (tls not really supported) {
if (referral exists) {
// caller will need to put the referral into the result
return(LDAP_REFERRAL);
}
return(LDAP_UNAVAILABLE);
}
*/
conn
->
c_is_tls
=
1
;
conn
->
c_needs_tls_accept
=
1
;
return
(
LDAP_SUCCESS
);
}
#endif
/* HAVE_TLS */
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