ldapsdk
0.0.1
|
Class to access the global (and connection specific) TLS Settings To access the global TLS Settings just instantiate a TlsOption object using the default constructor. More...
#include <TlsOptions.h>
Public Types | |
enum | tls_option { CACERTFILE =0, CACERTDIR, CERTFILE, KEYFILE, REQUIRE_CERT, PROTOCOL_MIN, CIPHER_SUITE, RANDOM_FILE, CRLCHECK, DHFILE } |
Available TLS Options. More... | |
enum | verifyMode { NEVER =0, HARD, DEMAND, ALLOW, TRY } |
Possible Values for the REQUIRE_CERT option. More... | |
enum | crlMode { CRL_NONE =0, CRL_PEER, CRL_ALL } |
Possible Values for the CRLCHECK option. More... | |
Public Member Functions | |
TlsOptions () | |
Default constructor. More... | |
void | setOption (tls_option opt, const std::string &value) const |
Set string valued options. More... | |
void | setOption (tls_option opt, int value) const |
Set integer valued options. More... | |
void | setOption (tls_option opt, void *value) const |
Generic setOption variant. More... | |
int | getIntOption (tls_option opt) const |
Read integer valued options. More... | |
std::string | getStringOption (tls_option opt) const |
Read string valued options. More... | |
void | getOption (tls_option opt, void *value) const |
Read options value. More... | |
Friends | |
class | LDAPAsynConnection |
Class to access the global (and connection specific) TLS Settings To access the global TLS Settings just instantiate a TlsOption object using the default constructor.
To access connection specific settings instantiate a TlsOption object through the getTlsOptions() method from the corresponding LDAPConnection/LDAPAsynConnection object.
enum TlsOptions::crlMode |
TlsOptions::TlsOptions | ( | ) |
Default constructor.
Gives access to the global TlsSettings
int TlsOptions::getIntOption | ( | tls_option | opt | ) | const |
Read integer valued options.
LDAPException | in case of error (invalid on non-integer valued option is requested) |
void TlsOptions::getOption | ( | tls_option | opt, |
void * | value | ||
) | const |
Read options value.
Usually you should prefer to use either getIntOption() or getStringOption()
value | points to a buffer containing the option value |
LDAPException | in case of error (invalid on non-string valued option is requested) |
std::string TlsOptions::getStringOption | ( | tls_option | opt | ) | const |
Read string valued options.
LDAPException | in case of error (invalid on non-string valued option is requested) |
void TlsOptions::setOption | ( | tls_option | opt, |
const std::string & | value | ||
) | const |
Set string valued options.
opt | The following string valued options are available: |
value | The value to apply to that option,
|
void TlsOptions::setOption | ( | tls_option | opt, |
int | value | ||
) | const |
Set integer valued options.
opt | The following string valued options are available: |
value | The value to apply to that option,
|
void TlsOptions::setOption | ( | tls_option | opt, |
void * | value | ||
) | const |
Generic setOption variant.
Generally you should prefer to use one of the other variants
|
friend |