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
Tero Saarni
OpenLDAP
Commits
8ea824dc
Commit
8ea824dc
authored
16 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
More for ITS#5955
Fix for randfile as well
parent
efba08cb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/libldap/tls2.c
+8
-2
8 additions, 2 deletions
libraries/libldap/tls2.c
with
8 additions
and
2 deletions
libraries/libldap/tls2.c
+
8
−
2
View file @
8ea824dc
...
...
@@ -559,6 +559,7 @@ ldap_int_tls_config( LDAP *ld, int option, const char *arg )
}
return
ldap_pvt_tls_set_option
(
ld
,
option
,
&
i
);
}
#ifdef HAVE_OPENSSL_CRL
case
LDAP_OPT_X_TLS_CRLCHECK
:
/* OpenSSL only */
i
=
-
1
;
if
(
strcasecmp
(
arg
,
"none"
)
==
0
)
{
...
...
@@ -572,6 +573,7 @@ ldap_int_tls_config( LDAP *ld, int option, const char *arg )
return
ldap_pvt_tls_set_option
(
ld
,
option
,
&
i
);
}
return
-
1
;
#endif
}
return
-
1
;
}
...
...
@@ -647,10 +649,12 @@ ldap_pvt_tls_get_option( LDAP *ld, int option, void *arg )
case
LDAP_OPT_X_TLS_PROTOCOL_MIN
:
*
(
int
*
)
arg
=
lo
->
ldo_tls_protocol_min
;
break
;
#ifdef HAVE_OPENSSL
case
LDAP_OPT_X_TLS_RANDOM_FILE
:
/* OpenSSL only */
*
(
char
**
)
arg
=
lo
->
ldo_tls_randfile
?
LDAP_STRDUP
(
lo
->
ldo_tls_randfile
)
:
NULL
;
break
;
#endif
case
LDAP_OPT_X_TLS_SSL_CTX
:
{
void
*
retval
=
0
;
if
(
ld
!=
NULL
)
{
...
...
@@ -763,6 +767,7 @@ ldap_pvt_tls_set_option( LDAP *ld, int option, void *arg )
return
0
;
}
return
-
1
;
#ifdef HAVE_OPENSSL_CRL
case
LDAP_OPT_X_TLS_CRLCHECK
:
/* OpenSSL only */
if
(
!
arg
)
return
-
1
;
switch
(
*
(
int
*
)
arg
)
{
...
...
@@ -773,6 +778,7 @@ ldap_pvt_tls_set_option( LDAP *ld, int option, void *arg )
return
0
;
}
return
-
1
;
#endif
case
LDAP_OPT_X_TLS_CIPHER_SUITE
:
if
(
lo
->
ldo_tls_ciphersuite
)
LDAP_FREE
(
lo
->
ldo_tls_ciphersuite
);
lo
->
ldo_tls_ciphersuite
=
arg
?
LDAP_STRDUP
(
(
char
*
)
arg
)
:
NULL
;
...
...
@@ -782,14 +788,14 @@ ldap_pvt_tls_set_option( LDAP *ld, int option, void *arg )
if
(
!
arg
)
return
-
1
;
lo
->
ldo_tls_protocol_min
=
*
(
int
*
)
arg
;
return
0
;
#ifdef HAVE_OPENSSL
case
LDAP_OPT_X_TLS_RANDOM_FILE
:
/* OpenSSL only */
if
(
ld
!=
NULL
)
return
-
1
;
if
(
lo
->
ldo_tls_randfile
)
LDAP_FREE
(
lo
->
ldo_tls_randfile
);
lo
->
ldo_tls_randfile
=
arg
?
LDAP_STRDUP
(
(
char
*
)
arg
)
:
NULL
;
break
;
#endif
case
LDAP_OPT_X_TLS_NEWCTX
:
if
(
!
arg
)
return
-
1
;
if
(
lo
->
ldo_tls_ctx
)
...
...
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