ldapsdk
0.0.1
Main Page
Classes
Files
File List
File Members
src
TlsOptions.h
Go to the documentation of this file.
1
// $OpenLDAP$
2
/*
3
* Copyright 2010-2011 The OpenLDAP Foundation, All Rights Reserved.
4
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5
*/
6
#ifndef TLS_OPTIONS_H
7
#define TLS_OPTIONS_H
8
#include <string>
9
#include <ldap.h>
10
21
class
TlsOptions
{
22
public
:
23
27
enum
tls_option
{
28
CACERTFILE
=0,
29
CACERTDIR
,
30
CERTFILE
,
31
KEYFILE
,
32
REQUIRE_CERT
,
33
PROTOCOL_MIN
,
34
CIPHER_SUITE
,
35
RANDOM_FILE
,
36
CRLCHECK
,
37
DHFILE
,
39
LASTOPT
/* dummy */
41
};
42
46
enum
verifyMode
{
47
NEVER
=0,
48
HARD
,
49
DEMAND
,
50
ALLOW
,
51
TRY
52
};
53
57
enum
crlMode
{
58
CRL_NONE
=0,
59
CRL_PEER
,
60
CRL_ALL
61
};
62
63
67
TlsOptions
();
68
99
void
setOption
(
tls_option
opt,
const
std::string& value)
const
;
100
121
void
setOption
(
tls_option
opt,
int
value)
const
;
122
127
void
setOption
(
tls_option
opt,
void
*value)
const
;
128
135
int
getIntOption
(
tls_option
opt)
const
;
136
143
std::string
getStringOption
(
tls_option
opt)
const
;
144
152
void
getOption
(
tls_option
opt,
void
*value )
const
;
153
154
private
:
155
TlsOptions
( LDAP* ld );
156
void
newCtx()
const
;
157
LDAP *m_ld;
158
159
friend
class
LDAPAsynConnection
;
160
};
161
162
#endif
/* TLS_OPTIONS_H */
Generated by
1.8.1