Skip to content
Snippets Groups Projects
Commit 0be22a17 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

significant update

parent 7d7f0e1d
No related branches found
No related tags found
No related merge requests found
...@@ -29,15 +29,142 @@ The actual type is determined based on the value of the ...@@ -29,15 +29,142 @@ The actual type is determined based on the value of the
argument. argument.
Global options are set/retrieved by passing a NULL LDAP handle. Global options are set/retrieved by passing a NULL LDAP handle.
.TP .TP
.B LDAP_OPT_API_FEATURE_INFO
Fills-in a
.BR "LDAPAPIFeatureInfo" ;
.BR outvalue
must be a
.BR "LDAPAPIFeatureInfo *" ,
pointing to an already allocated struct.
This is a read-only option.
.TP
.B LDAP_OPT_API_INFO .B LDAP_OPT_API_INFO
Fills-in a Fills-in a
.BR "struct ldapapiinfo" ; .BR "LDAPAPIInfo" ;
.BR outvalue .BR outvalue
must be a must be a
.BR "struct ldapapiinfo *" , .BR "LDAPAPIInfo *" ,
pointing to an already allocated struct. pointing to an already allocated struct.
This is a read-only option. This is a read-only option.
.TP .TP
.B LDAP_OPT_CLIENT_CONTROLS
Sets/gets the client-side controls to be used for all operations.
This is now deprecated as modern LDAP C API provides replacements
for all main operations which accepts client-side controls as
explicit arguments; see for example
.BR ldap_search_ext (3),
.BR ldap_add_ext (3),
.BR ldap_modify_ext (3)
and so on.
.BR outvalue
must be
.BR "LDAPControl ***" ,
and the caller is responsible of freeing the returned controls, if any,
by calling
.BR ldap_controls_free (3),
while
.BR invalue
must be
.BR "LDAPControl *const *" ;
the library duplicates the controls passed via
.BR invalue .
.TP
.B LDAP_OPT_CONNECT_ASYNC
Sets/gets the status of the asynchronous connect flag.
.BR invalue
should either be
.BR LDAP_OPT_OFF
or
.BR LDAP_OPT_ON ;
.BR outvalue
must be
.BR "int *" .
When set, the library will call
.BR connect (2)
and return, without waiting for response.
This leaves the handle in a connecting state.
Subsequent calls to library routines will poll for completion
of the connect before performing further operations.
As a consequence, library calls that need to establish a connection
with a DSA do not block even for the network timeout
(option
.BR LDAP_OPT_NETWORK_TIMEOUT ).
This option is OpenLDAP specific.
.TP
.B LDAP_OPT_CONNECT_CB
This option allows to set a connect callback.
.B invalue
must be a
.BR "const struct ldap_conncb *" .
Callbacks are executed in last in-first served order.
Handle-specific callbacks are executed first, followed by global ones.
Right before freeing the callback structure, the
.B lc_del
callback handler is passed a
.B NULL
.BR Sockbuf .
Calling
.BR ldap_get_option (3)
for this option removes the callback whose pointer matches
.BR outvalue .
This option is OpenLDAP specific.
.TP
.B LDAP_OPT_DEBUG_LEVEL
Sets/gets the debug level of the client library.
.BR invalue
must be a
.BR "const int *" ;
.BR outvalue
must be a
.BR "int *" .
Valid debug levels are
.BR LDAP_DEBUG_ANY ,
.BR LDAP_DEBUG_ARGS ,
.BR LDAP_DEBUG_BER ,
.BR LDAP_DEBUG_CONNS ,
.BR LDAP_DEBUG_NONE ,
.BR LDAP_DEBUG_PACKETS ,
.BR LDAP_DEBUG_PARSE ,
and
.BR LDAP_DEBUG_TRACE .
This option is OpenLDAP specific.
.TP
.B LDAP_OPT_DEFBASE
Sets/gets a string containing the DN to be used as default base
for search operations.
.BR outvalue
must be a
.BR "char **" ,
and the caller is responsible of freeing the returned string by calling
.BR ldap_memfree (3),
while
.BR invalue
must be a
.BR "const char *" ;
the library duplicates the corresponding string.
This option is OpenLDAP specific.
.TP
.B LDAP_OPT_DEREF
Sets/gets the value that defines when alias dereferencing must occur.
.BR invalue
must be
.BR "const int *" ;
.BR outvalue
must be
.BR "int *" .
They cannot be NULL.
The value of
.BR *invalue
should be one of
.BR LDAP_DEREF_NEVER
(the default),
.BR LDAP_DEREF_SEARCHING ,
.BR LDAP_DEREF_FINDING ,
or
.BR LDAP_DEREF_ALWAYS .
Note that this has ever been the only means to determine alias dereferencing
within search operations.
.TP
.B LDAP_OPT_DESC .B LDAP_OPT_DESC
Returns the file descriptor associated to the socket buffer Returns the file descriptor associated to the socket buffer
of the LDAP handle passed in as of the LDAP handle passed in as
...@@ -45,29 +172,51 @@ of the LDAP handle passed in as ...@@ -45,29 +172,51 @@ of the LDAP handle passed in as
.BR outvalue .BR outvalue
must be a must be a
.BR "int *" . .BR "int *" .
This is a read-only, handler-specific option. This is a read-only, handle-specific option.
.TP .TP
.B LDAP_OPT_SOCKBUF .B LDAP_OPT_DIAGNOSTIC_MESSAGE
Returns a pointer to the socket buffer of the LDAP handle passed in as Sets/gets a string containing the error string associated to the LDAP handle.
.BR ld ; This option was formerly known as
.BR LDAP_OPT_ERROR_STRING .
.BR outvalue .BR outvalue
must be a
.BR "char **" ,
and the caller is responsible of freeing the returned string by calling
.BR ldap_memfree (3),
while
.BR invalue
must be a must be a
.BR "Sockbuf **" . .BR "char *" ;
This is a read-only, handler-specific option. the library duplicates the corresponding string.
.TP .TP
.B LDAP_OPT_TIMEOUT .B LDAP_OPT_HOST_NAME
Sets/gets a timeout value for the synchronous API calls. Sets/gets a space-separated list of hosts to be contacted by the library
.B outvalue when trying to establish a connection.
This is now deprecated in favor of
.BR LDAP_OPT_URI .
.BR outvalue
must be a must be a
.BR "struct timeval **" .BR "char **" ,
(the caller has to free and the caller is responsible of freeing the resulting string by calling
.BR *outvalue ) , .BR ldap_memfree (3),
and while
.B invalue .BR invalue
must be a must be a
.BR "struct timeval *" , .BR "const char *" ;
and they cannot be NULL. Using a struct with seconds set to \-1 results the library duplicates the corresponding string.
in an infinite timeout, which is the default. .TP
.B LDAP_OPT_MATCHED_DN
Sets/gets a string containing the matched DN associated to the LDAP handle.
.BR outvalue
must be a
.BR "char **" ,
and the caller is responsible of freeing the returned string by calling
.BR ldap_memfree (3),
while
.BR invalue
must be a
.BR "const char *" ;
the library duplicates the corresponding string.
.TP .TP
.B LDAP_OPT_NETWORK_TIMEOUT .B LDAP_OPT_NETWORK_TIMEOUT
Sets/gets the network timeout value after which Sets/gets the network timeout value after which
...@@ -83,69 +232,72 @@ must be a ...@@ -83,69 +232,72 @@ must be a
and and
.B invalue .B invalue
must be a must be a
.BR "struct timeval *" , .BR "const struct timeval *" .
and they cannot be NULL. Using a struct with seconds set to \-1 results They cannot be NULL. Using a struct with seconds set to \-1 results
in an infinite timeout, which is the default. in an infinite timeout, which is the default.
This option is OpenLDAP specific.
.TP .TP
.B LDAP_OPT_DEREF .B LDAP_OPT_PROTOCOL_VERSION
Sets/gets the value that defines when alias dereferencing must occur. Sets/gets the protocol version.
.BR outvalue .BR outvalue
and and
.BR invalue
must be
.BR "int *" ,
and they cannot be NULL.
.TP
.B LDAP_OPT_SIZELIMIT
Sets/gets the value that defines the maximum number of entries
to be returned by a search operation.
.BR outvalue
and
.BR invalue .BR invalue
must be must be
.BR "int *" , .BR "int *" .
and they cannot be NULL.
.TP .TP
.B LDAP_OPT_TIMELIMIT .B LDAP_OPT_REFERRAL_URLS
Sets/gets the value that defines the time limit after which Sets/gets an array containing the referral URIs associated to the LDAP handle.
a search operation should be terminated by the server. .BR outvalue
.BR outvalue must be a
and .BR "char ***" ,
and the caller is responsible of freeing the returned string by calling
.BR ldap_memvfree (3),
while
.BR invalue .BR invalue
must be must be a NULL-terminated
.BR "int *" , .BR "char *const *" ;
and they cannot be NULL. the library duplicates the corresponding string.
This option is OpenLDAP specific.
.TP .TP
.B LDAP_OPT_REFERRALS .B LDAP_OPT_REFERRALS
Determines whether the library should implicitly chase referrals or not. Determines whether the library should implicitly chase referrals or not.
.BR outvalue
and
.BR invalue .BR invalue
must be must be
.BR "int *" ; .BR "const int *" ;
their value should either be its value should either be
.BR LDAP_OPT_OFF .BR LDAP_OPT_OFF
or or
.BR LDAP_OPT_ON . .BR LDAP_OPT_ON .
.BR outvalue
must be
.BR "int *" .
.\".TP
.\".B LDAP_OPT_REFHOPLIMIT
.\"This option is OpenLDAP specific.
.\"It is not currently implemented.
.TP .TP
.B LDAP_OPT_RESTART .B LDAP_OPT_RESTART
Determines whether the library should implicitly restart connections (FIXME). Determines whether the library should implicitly restart connections (FIXME).
.BR outvalue
and
.BR invalue .BR invalue
must be must be
.BR "int *" ; .BR "const int *" ;
their value should either be its value should either be
.BR LDAP_OPT_OFF .BR LDAP_OPT_OFF
or or
.BR LDAP_OPT_ON . .BR LDAP_OPT_ON .
.TP
.B LDAP_OPT_PROTOCOL_VERSION
Sets/gets the protocol version.
.BR outvalue .BR outvalue
and must be
.BR "int *" .
.TP
.B LDAP_OPT_RESULT_CODE
Sets/gets the LDAP result code associated to the handle.
This option was formerly known as
.BR LDAP_OPT_ERROR_NUMBER .
.BR invalue .BR invalue
must be must be a
.BR "const int *" .
.BR outvalue
must be a
.BR "int *" . .BR "int *" .
.TP .TP
.B LDAP_OPT_SERVER_CONTROLS .B LDAP_OPT_SERVER_CONTROLS
...@@ -166,50 +318,60 @@ by calling ...@@ -166,50 +318,60 @@ by calling
while while
.BR invalue .BR invalue
must be must be
.BR "LDAPControl **" ; .BR "LDAPControl *const *" ;
the library duplicates the controls passed via the library duplicates the controls passed via
.BR invalue . .BR invalue .
.TP .TP
.B LDAP_OPT_CLIENT_CONTROLS .B LDAP_OPT_SIZELIMIT
Sets/gets the client-side controls to be used for all operations. Sets/gets the value that defines the maximum number of entries
This is now deprecated as modern LDAP C API provides replacements to be returned by a search operation.
for all main operations which accepts client-side controls as
explicit arguments; see for example
.BR ldap_search_ext (3),
.BR ldap_add_ext (3),
.BR ldap_modify_ext (3)
and so on.
.BR outvalue
must be
.BR "LDAPControl ***" ,
and the caller is responsible of freeing the returned controls, if any,
by calling
.BR ldap_controls_free (3),
while
.BR invalue .BR invalue
must be must be
.BR "LDAPControl **" ; .BR "const int *" ,
the library duplicates the controls passed via while
.BR invalue . .BR outvalue
must be
.BR "int *" ;
They cannot be NULL.
.TP .TP
.B LDAP_OPT_HOST_NAME .B LDAP_OPT_SOCKBUF
Sets/gets a space-separated list of hosts to be contacted by the library Returns a pointer to the socket buffer of the LDAP handle passed in as
when trying to establish a connection. .BR ld ;
This is now deprecated in favor of
.BR LDAP_OPT_URI .
.BR outvalue .BR outvalue
must be a must be a
.BR "char **" , .BR "Sockbuf **" .
and the caller is responsible of freeing the resulting string by calling This is a read-only, handle-specific option.
.BR ldap_memfree (3), This option is OpenLDAP specific.
while .TP
.B LDAP_OPT_TIMELIMIT
Sets/gets the value that defines the time limit after which
a search operation should be terminated by the server.
.BR invalue .BR invalue
must be
.BR "const int *" ,
while
.BR outvalue
must be
.BR "int *" ,
and they cannot be NULL.
.TP
.B LDAP_OPT_TIMEOUT
Sets/gets a timeout value for the synchronous API calls.
.B outvalue
must be a must be a
.BR "char *" ; .BR "struct timeval **"
the library duplicates the corresponding string. (the caller has to free
.BR *outvalue ) ,
and
.B invalue
must be a
.BR "struct timeval *" ,
and they cannot be NULL. Using a struct with seconds set to \-1 results
in an infinite timeout, which is the default.
This option is OpenLDAP specific.
.TP .TP
.B LDAP_OPT_URI .B LDAP_OPT_URI
Sets/gets a space-separated list of URIs to be contacted by the library Sets/gets a comma- or space-separated list of URIs to be contacted by the library
when trying to establish a connection. when trying to establish a connection.
.BR outvalue .BR outvalue
must be a must be a
...@@ -219,96 +381,366 @@ and the caller is responsible of freeing the resulting string by calling ...@@ -219,96 +381,366 @@ and the caller is responsible of freeing the resulting string by calling
while while
.BR invalue .BR invalue
must be a must be a
.BR "char *" ; .BR "const char *" ;
the library parses the string into a list of the library parses the string into a list of
.BR LDAPURLDesc .BR LDAPURLDesc
structures, so the invocation of structures, so the invocation of
.BR ldap_set_option (3) .BR ldap_set_option (3)
may fail if URL parsing fails. may fail if URL parsing fails.
URIs may only contain the
.BR schema ,
the
.BR host ,
and the
.BR port
fields.
This option is OpenLDAP specific.
.SH SASL OPTIONS
The SASL options are OpenLDAP specific.
.TP .TP
.B LDAP_OPT_DEFBASE .B LDAP_OPT_X_SASL_AUTHCID
Sets/gets a string containing the DN to be used as default base Gets the SASL authentication identity;
for search operations.
.BR outvalue .BR outvalue
must be a must be a
.BR "char **" , .BR "char **" ,
and the caller is responsible of freeing the returned string by calling its content needs to be freed by the caller using
.BR ldap_memfree (3), .BR ldap_memfree (3).
while .TP
.B LDAP_OPT_X_SASL_AUTHZID
Gets the SASL authorization identity;
.BR outvalue
must be a
.BR "char **" ,
its content needs to be freed by the caller using
.BR ldap_memfree (3).
.TP
.B LDAP_OPT_X_SASL_MAXBUFSIZE
Gets/sets SASL maximum buffer size;
.BR invalue .BR invalue
must be a must be
.BR "char *" ; .BR "const ber_len_t *" ,
the library duplicates the corresponding string. while
.BR outvalue
must be
.BR "ber_len_t *" .
See also
.BR LDAP_OPT_X_SASL_SECPROPS .
.TP .TP
.B LDAP_OPT_RESULT_CODE .B LDAP_OPT_X_SASL_MECH
Sets/gets the LDAP result code associated to the handle. Gets the SASL mechanism;
This option was formerly known as
.BR LDAP_OPT_ERROR_NUMBER .
Both
.BR outvalue .BR outvalue
and must be a
.BR "char **" ,
its content needs to be freed by the caller using
.BR ldap_memfree (3).
.TP
.B LDAP_OPT_X_SASL_MECHLIST
Gets the list of the available mechanisms,
in form of a NULL-terminated array of strings;
.BR outvalue
must be
.BR "char ***" .
The caller must not free or otherwise muck with it.
.TP
.B LDAP_OPT_X_SASL_NOCANON
Sets/gets the NOCANON flag.
When unset, the hostname is canonicalized.
.BR invalue .BR invalue
must be a must be
.BR "const int *" ;
its value should either be
.BR LDAP_OPT_OFF
or
.BR LDAP_OPT_ON .
.BR outvalue
must be
.BR "int *" . .BR "int *" .
.TP .TP
.B LDAP_OPT_DIAGNOSTIC_MESSAGE .B LDAP_OPT_X_SASL_REALM
Sets/gets a string containing the error string associated to the LDAP handle. Gets the SASL realm;
This option was formerly known as
.BR LDAP_OPT_ERROR_STRING .
.BR outvalue .BR outvalue
must be a must be a
.BR "char **" , .BR "char **" ,
and the caller is responsible of freeing the returned string by calling its content needs to be freed by the caller using
.BR ldap_memfree (3), .BR ldap_memfree (3).
while .TP
.B LDAP_OPT_X_SASL_SECPROPS
Sets the SASL secprops;
.BR invalue .BR invalue
must be a must be a
.BR "char *" ; .BR "char *" ,
the library duplicates the corresponding string. containing a comma-separated list of properties.
Legal values are:
.BR none ,
.BR nodict ,
.BR noplain ,
.BR noactive ,
.BR passcred ,
.BR forwardsec ,
.BR noanonymous ,
.BR minssf=<minssf> ,
.BR maxssf=<maxssf> ,
.BR maxbufsize=<maxbufsize> .
.TP .TP
.B LDAP_OPT_MATCHED_DN .B LDAP_OPT_X_SASL_SSF
Sets/gets a string containing the matched DN associated to the LDAP handle. Gets the SASL SSF;
.BR outvalue .BR outvalue
must be a must be a
.BR "char **" , .BR "ber_len_t *" .
and the caller is responsible of freeing the returned string by calling .TP
.BR ldap_memfree (3), .B LDAP_OPT_X_SASL_SSF_EXTERNAL
Sets the SASL SSF value related to an authentication
performed using an EXTERNAL mechanism;
.BR invalue
must be a
.BR "const ber_len_t *" .
.TP
.B LDAP_OPT_X_SASL_SSF_MAX
Gets/sets SASL maximum SSF;
.BR invalue
must be
.BR "const ber_len_t *" ,
while while
.BR outvalue
must be
.BR "ber_len_t *" .
See also
.BR LDAP_OPT_X_SASL_SECPROPS .
.TP
.B LDAP_OPT_X_SASL_SSF_MIN
Gets/sets SASL minimum SSF;
.BR invalue .BR invalue
must be a must be
.BR "char *" ; .BR "const ber_len_t *" ,
the library duplicates the corresponding string. while
.BR outvalue
must be
.BR "ber_len_t *" .
See also
.BR LDAP_OPT_X_SASL_SECPROPS .
.TP .TP
.B LDAP_OPT_REFERRAL_URLS .B LDAP_OPT_X_SASL_USERNAME
Sets/gets an array containing the referral URIs associated to the LDAP handle. Gets the SASL username;
.BR outvalue .BR outvalue
must be a must be a
.BR "char ***" , .BR "char **" .
and the caller is responsible of freeing the returned string by calling Its content needs to be freed by the caller using
.BR ber_memvfree (3), .BR ldap_memfree (3).
while .SH TCP OPTIONS
The TCP options are OpenLDAP specific.
Mainly intended for use with Linux, they may not be portable.
.TP
.B LDAP_OPT_X_KEEPALIVE_IDLE
Sets/gets the number of seconds a connection needs to remain idle
before TCP starts sending keepalive probes.
.BR invalue .BR invalue
must be a NULL-terminated must be
.BR "char **" ; .BR "const int *" ;
the library duplicates the corresponding string. .BR outvalue
must be
.BR "int *" .
.TP .TP
.B LDAP_OPT_API_FEATURE_INFO .B LDAP_OPT_X_KEEPALIVE_PROBES
Fills-in a Sets/gets the maximum number of keepalive probes TCP should send
.BR "LDAPAPIFeatureInfo" ; before dropping the connection.
.BR outvalue .BR invalue
must be a must be
.BR "LDAPAPIFeatureInfo *" , .BR "const int *" ;
pointing to an already allocated struct. .BR outvalue
This is a read-only option. must be
.BR "int *" .
.TP .TP
.B LDAP_OPT_DEBUG_LEVEL .B LDAP_OPT_X_KEEPALIVE_INTERVAL
Sets/gets the debug level of the client library. Sets/gets the interval in seconds between individual keepalive probes.
Both .BR invalue
must be
.BR "const int *" ;
.BR outvalue .BR outvalue
and must be
.BR "int *" .
.SH TLS OPTIONS
The TLS options are OpenLDAP specific.
.\".TP
.\".B LDAP_OPT_X_TLS
.\"Sets/gets the TLS mode.
.TP
.B LDAP_OPT_X_TLS_CACERTDIR
Sets/gets the path of the directory containing CA certificates.
.BR invalue .BR invalue
must be a must be
.BR "const char *" ;
.BR outvalue
must be
.BR "char **" ,
and its contents need to be freed by the caller using
.BR ldap_memfree (3).
.TP
.B LDAP_OPT_X_TLS_CACERTFILE
Sets/gets the full-path of the CA certificate file.
.BR invalue
must be
.BR "const char *" ;
.BR outvalue
must be
.BR "char **" ,
and its contents need to be freed by the caller using
.BR ldap_memfree (3).
.TP
.B LDAP_OPT_X_TLS_CERTFILE
Sets/gets the full-path of the certificate file.
.BR invalue
must be
.BR "const char *" ;
.BR outvalue
must be
.BR "char **" ,
and its contents need to be freed by the caller using
.BR ldap_memfree (3).
.TP
.B LDAP_OPT_X_TLS_CIPHER_SUITE
Sets/gets the allowed cipher suite.
.BR invalue
must be
.BR "const char *" ;
.BR outvalue
must be
.BR "char **" ,
and its contents need to be freed by the caller using
.BR ldap_memfree (3).
.TP
.B LDAP_OPT_X_TLS_CONNECT_ARG
Sets/gets the connection callback argument.
.BR invalue
must be
.BR "const void *" ;
.BR outvalue
must be
.BR "void **" .
.TP
.B LDAP_OPT_X_TLS_CONNECT_CB
Sets/gets the connection callback handle.
.BR invalue
must be
.BR "const LDAP_TLS_CONNECT_CB *" ;
.BR outvalue
must be
.BR "LDAP_TLS_CONNECT_CB **" .
.TP
.B LDAP_OPT_X_TLS_CRLCHECK
Sets/gets the CRL evaluation strategy, one of
.BR LDAP_OPT_X_TLS_CRL_NONE ,
.BR LDAP_OPT_X_TLS_CRL_PEER ,
or
.BR LDAP_OPT_X_TLS_CRL_ALL .
.BR invalue
must be
.BR "const int *" ;
.BR outvalue
must be
.BR "int *" .
Requires OpenSSL.
.TP
.B LDAP_OPT_X_TLS_CRLFILE
Sets/gets the full-path of the CRL file.
.BR invalue
must be
.BR "const char *" ;
.BR outvalue
must be
.BR "char **" ,
and its contents need to be freed by the caller using
.BR ldap_memfree (3).
This option is only valid for GnuTLS.
.TP
.B LDAP_OPT_X_TLS_CTX
Sets/gets the TLS library context. New TLS sessions will inherit their
default settings from this library context.
.BR invalue
must be
.BR "const void *" ;
.BR outvalue
must be
.BR "void **" .
When using the OpenSSL library this is an SSL_CTX*. When using other
crypto libraries this is a pointer to an OpenLDAP private structure.
Applications generally should not use this option or attempt to
manipulate this structure.
.TP
.B LDAP_OPT_X_TLS_DHFILE
Gets/sets the full-path of the file containing the parameters
for Diffie-Hellman ephemeral key exchange.
.BR invalue
must be
.BR "const char *" ;
.BR outvalue
must be
.BR "char **" ,
and its contents need to be freed by the caller using
.BR ldap_memfree (3).
Ignored by GnuTLS.
.TP
.B LDAP_OPT_X_TLS_KEYFILE
Sets/gets the full-path of the certificate key file.
.BR invalue
must be
.BR "const char *" ;
.BR outvalue
must be
.BR "char **" ,
and its contents need to be freed by the caller using
.BR ldap_memfree (3).
.TP
.B LDAP_OPT_X_TLS_NEWCTX
Instructs the library to create a new TLS library context.
.BR invalue
must be
.BR "const int *" .
A non-zero value pointed to by
.BR invalue
tells the library to create a context for a server.
.TP
.B LDAP_OPT_X_TLS_PROTOCOL_MIN
Sets/gets the minimum protocol version.
.BR invalue
must be
.BR "const int *" ;
.BR outvalue
must be
.BR "int *" . .BR "int *" .
.TP
.B LDAP_OPT_X_TLS_RANDOM_FILE
Sets/gets the random file when
.B /dev/random
and
.B /dev/urandom
are not available.
.BR invalue
must be
.BR "const char *" ;
.BR outvalue
must be
.BR "char **" ,
and its contents need to be freed by the caller using
.BR ldap_memfree (3).
Ignored by GnuTLS older than version 2.2.
.TP
.B LDAP_OPT_X_TLS_REQUIRE_CERT
Sets/gets the peer certificate checking strategy,
one of
.BR LDAP_OPT_X_TLS_NEVER ,
.BR LDAP_OPT_X_TLS_HARD ,
.BR LDAP_OPT_X_TLS_DEMAND ,
.BR LDAP_OPT_X_TLS_ALLOW ,
.BR LDAP_OPT_X_TLS_TRY .
.TP
.B LDAP_OPT_X_TLS_SSL_CTX
Gets the TLS session context associated with this handle.
.BR outvalue
must be
.BR "void **" .
When using the OpenSSL library this is an SSL*. When using other
crypto libraries this is a pointer to an OpenLDAP private structure.
Applications generally should not use this option.
.SH ERRORS .SH ERRORS
On success, the functions return On success, the functions return
.BR LDAP_OPT_SUCCESS , .BR LDAP_OPT_SUCCESS ,
...@@ -328,6 +760,16 @@ Application developers are encouraged to either implement consistent ...@@ -328,6 +760,16 @@ Application developers are encouraged to either implement consistent
referral chasing features, or explicitly disable referral chasing referral chasing features, or explicitly disable referral chasing
by setting that option to by setting that option to
.BR LDAP_OPT_OFF . .BR LDAP_OPT_OFF .
.P
The protocol version used by the library defaults to LDAPv2 (now historic),
which corresponds to the
.B LDAP_VERSION2
macro.
Application developers are encouraged to explicitly set
.B LDAP_OPT_PROTOCOL_VERSION
to LDAPv3, using the
.B LDAP_VERSION3
macro, or to allow users to select the protocol version.
.SH SEE ALSO .SH SEE ALSO
.BR ldap (3), .BR ldap (3),
.BR ldap_error (3), .BR ldap_error (3),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment