TlsOptions Class Reference

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>

List of all members.

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.
void setOption (tls_option opt, const std::string &value) const
 Set string valued options.
void setOption (tls_option opt, int value) const
 Set integer valued options.
void setOption (tls_option opt, void *value) const
 Generic setOption variant.
int getIntOption (tls_option opt) const
 Read integer valued options.
std::string getStringOption (tls_option opt) const
 Read string valued options.
void getOption (tls_option opt, void *value) const
 Read options value.

Friends

class LDAPAsynConnection

Detailed Description

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.


Member Enumeration Documentation

Possible Values for the CRLCHECK option.

Enumerator:
CRL_NONE 
CRL_PEER 
CRL_ALL 

Available TLS Options.

Enumerator:
CACERTFILE 
CACERTDIR 
CERTFILE 
KEYFILE 
REQUIRE_CERT 
PROTOCOL_MIN 
CIPHER_SUITE 
RANDOM_FILE 
CRLCHECK 
DHFILE 

Possible Values for the REQUIRE_CERT option.

Enumerator:
NEVER 
HARD 
DEMAND 
ALLOW 
TRY 

Constructor & Destructor Documentation

TlsOptions::TlsOptions (  ) 

Default constructor.

Gives access to the global TlsSettings


Member Function Documentation

int TlsOptions::getIntOption ( tls_option  opt  )  const

Read integer valued options.

Returns:
Option value
Exceptions:
LDAPException in case of error (invalid on non-integer valued option is requested)

References INT.

void TlsOptions::getOption ( tls_option  opt,
void *  value 
) const

Read options value.

Usually you should prefer to use either getIntOption() or getStringOption()

Parameters:
value points to a buffer containing the option value
Exceptions:
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.

Returns:
Option value
Exceptions:
LDAPException in case of error (invalid on non-string valued option is requested)

References STRING.

void TlsOptions::setOption ( tls_option  opt,
void *  value 
) const

Generic setOption variant.

Generally you should prefer to use one of the other variants

void TlsOptions::setOption ( tls_option  opt,
int  value 
) const

Set integer valued options.

Parameters:
opt The following string valued options are available:

value The value to apply to that option,

References INT, and setOption().

void TlsOptions::setOption ( tls_option  opt,
const std::string &  value 
) const

Set string valued options.

Parameters:
opt The following string valued options are available:

value The value to apply to that option,

References STRING.

Referenced by setOption().


Friends And Related Function Documentation

friend class LDAPAsynConnection [friend]

The documentation for this class was generated from the following files:
Generated on Mon Jul 5 13:35:54 2010 for ldapsdk by  doxygen 1.6.3