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
25a4e780
Commit
25a4e780
authored
Dec 08, 2009
by
Howard Chu
Browse files
ITS
#6419
also init for ldaps:// URIs
parent
2c1c2006
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/config.c
View file @
25a4e780
...
...
@@ -1293,8 +1293,29 @@ slap_keepalive_parse(
return
0
;
}
static
int
slap_sb_uri
(
struct
berval
*
val
,
void
*
bcp
,
slap_cf_aux_table
*
tab0
,
const
char
*
tabmsg
,
int
unparse
)
{
slap_bindconf
*
bc
=
bcp
;
if
(
unparse
)
{
*
val
=
bc
->
sb_uri
;
}
else
{
bc
->
sb_uri
=
*
val
;
#ifdef HAVE_TLS
if
(
ldap_is_ldaps_url
(
val
->
bv_val
))
bc
->
sb_tls_do_init
=
1
;
#endif
}
return
0
;
}
static
slap_cf_aux_table
bindkey
[]
=
{
{
BER_BVC
(
"uri="
),
offsetof
(
slap_bindconf
,
sb_uri
),
'b'
,
1
,
NULL
},
{
BER_BVC
(
"uri="
),
0
,
'x'
,
1
,
slap_sb_uri
},
{
BER_BVC
(
"version="
),
offsetof
(
slap_bindconf
,
sb_version
),
'i'
,
0
,
versionkey
},
{
BER_BVC
(
"bindmethod="
),
offsetof
(
slap_bindconf
,
sb_method
),
'i'
,
0
,
methkey
},
{
BER_BVC
(
"timeout="
),
offsetof
(
slap_bindconf
,
sb_timeout_api
),
'i'
,
0
,
NULL
},
...
...
@@ -1317,11 +1338,11 @@ static slap_cf_aux_table bindkey[] = {
{
BER_BVC
(
"tls_key="
),
offsetof
(
slap_bindconf
,
sb_tls_key
),
's'
,
1
,
NULL
},
{
BER_BVC
(
"tls_cacert="
),
offsetof
(
slap_bindconf
,
sb_tls_cacert
),
's'
,
1
,
NULL
},
{
BER_BVC
(
"tls_cacertdir="
),
offsetof
(
slap_bindconf
,
sb_tls_cacertdir
),
's'
,
1
,
NULL
},
{
BER_BVC
(
"tls_reqcert="
),
offsetof
(
slap_bindconf
,
sb_tls_reqcert
),
's'
,
1
,
NULL
},
{
BER_BVC
(
"tls_cipher_suite="
),
offsetof
(
slap_bindconf
,
sb_tls_cipher_suite
),
's'
,
1
,
NULL
},
{
BER_BVC
(
"tls_protocol_min="
),
offsetof
(
slap_bindconf
,
sb_tls_protocol_min
),
's'
,
1
,
NULL
},
{
BER_BVC
(
"tls_reqcert="
),
offsetof
(
slap_bindconf
,
sb_tls_reqcert
),
's'
,
0
,
NULL
},
{
BER_BVC
(
"tls_cipher_suite="
),
offsetof
(
slap_bindconf
,
sb_tls_cipher_suite
),
's'
,
0
,
NULL
},
{
BER_BVC
(
"tls_protocol_min="
),
offsetof
(
slap_bindconf
,
sb_tls_protocol_min
),
's'
,
0
,
NULL
},
#ifdef HAVE_OPENSSL_CRL
{
BER_BVC
(
"tls_crlcheck="
),
offsetof
(
slap_bindconf
,
sb_tls_crlcheck
),
's'
,
1
,
NULL
},
{
BER_BVC
(
"tls_crlcheck="
),
offsetof
(
slap_bindconf
,
sb_tls_crlcheck
),
's'
,
0
,
NULL
},
#endif
#endif
{
BER_BVNULL
,
0
,
0
,
0
,
NULL
}
...
...
servers/slapd/syncrepl.c
View file @
25a4e780
...
...
@@ -4060,6 +4060,10 @@ parse_syncrepl_line(
{
val
=
c
->
argv
[
i
]
+
STRLENOF
(
PROVIDERSTR
"="
);
ber_str2bv
(
val
,
0
,
1
,
&
si
->
si_bindconf
.
sb_uri
);
#ifdef HAVE_TLS
if
(
ldap_is_ldaps_url
(
val
))
si
->
si_bindconf
.
sb_tls_do_init
=
1
;
#endif
si
->
si_got
|=
GOT_PROVIDER
;
}
else
if
(
!
strncasecmp
(
c
->
argv
[
i
],
SCHEMASTR
"="
,
STRLENOF
(
SCHEMASTR
"="
)
)
)
...
...
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