OpenVPN 3 Core Library
Loading...
Searching...
No Matches
test_sslctx.cpp File Reference
Include dependency graph for test_sslctx.cpp:

Go to the source code of this file.

Macros

#define ITER   1000
 
#define ITER_OUT_LIMIT   1000
 

Functions

 TEST (sslctx_ut, create_config)
 
 TEST (sslctx_ut, config_new_factory_server)
 
 TEST (sslctx_ut, config_new_factory_client)
 
template<typename T >
void do_write (T &obj, const bool server, char *msg, const size_t len, long &count, const int iter)
 
template<typename T >
void do_read (T &obj, const bool server, char *msg, const size_t len, long &count, const int iter)
 
static bool xfer_oneway (SSLAPI &sender, SSLAPI &recv, std::string out)
 
static void xfer (SSLAPI &cli, SSLAPI &serv)
 
static auto MakeClient (Frame::Ptr frame, const std::string &pvt_key, const std::string &cert, const std::string &ca="")
 
static auto MakeServer (Frame::Ptr frame, const std::string &pvt_key, const std::string &cert)
 
 TEST (sslctx_ut, handshake)
 
 TEST (sslctx_ut, ca_handshake)
 
 TEST (sslctx_ut, handshake_fail)
 
 TEST (sslctx_ut, clienthello)
 

Variables

const std::string pvt_key_txt
 
const std::string fail_pvt_key_txt
 
const std::string cert_txt
 
const std::string fail_cert_txt
 
const std::string certcrl_txt
 
const std::string dhparam_txt
 

Macro Definition Documentation

◆ ITER

#define ITER   1000

Definition at line 293 of file test_sslctx.cpp.

◆ ITER_OUT_LIMIT

#define ITER_OUT_LIMIT   1000

Definition at line 294 of file test_sslctx.cpp.

Function Documentation

◆ do_read()

template<typename T >
void do_read ( T &  obj,
const bool  server,
char *  msg,
const size_t  len,
long &  count,
const int  iter 
)
inline

Definition at line 309 of file test_sslctx.cpp.

◆ do_write()

template<typename T >
void do_write ( T &  obj,
const bool  server,
char *  msg,
const size_t  len,
long &  count,
const int  iter 
)
inline

Definition at line 298 of file test_sslctx.cpp.

◆ MakeClient()

static auto MakeClient ( Frame::Ptr  frame,
const std::string &  pvt_key,
const std::string &  cert,
const std::string &  ca = "" 
)
inlinestatic

Definition at line 360 of file test_sslctx.cpp.

Here is the caller graph for this function:

◆ MakeServer()

static auto MakeServer ( Frame::Ptr  frame,
const std::string &  pvt_key,
const std::string &  cert 
)
inlinestatic

Definition at line 392 of file test_sslctx.cpp.

Here is the caller graph for this function:

◆ TEST() [1/7]

TEST ( sslctx_ut  ,
ca_handshake   
)

Definition at line 444 of file test_sslctx.cpp.

◆ TEST() [2/7]

TEST ( sslctx_ut  ,
clienthello   
)

Definition at line 496 of file test_sslctx.cpp.

◆ TEST() [3/7]

TEST ( sslctx_ut  ,
config_new_factory_client   
)

Definition at line 270 of file test_sslctx.cpp.

◆ TEST() [4/7]

TEST ( sslctx_ut  ,
config_new_factory_server   
)

Definition at line 247 of file test_sslctx.cpp.

◆ TEST() [5/7]

TEST ( sslctx_ut  ,
create_config   
)

Definition at line 239 of file test_sslctx.cpp.

◆ TEST() [6/7]

TEST ( sslctx_ut  ,
handshake   
)

Definition at line 417 of file test_sslctx.cpp.

◆ TEST() [7/7]

TEST ( sslctx_ut  ,
handshake_fail   
)

Definition at line 471 of file test_sslctx.cpp.

◆ xfer()

static void xfer ( SSLAPI cli,
SSLAPI serv 
)
inlinestatic

Definition at line 352 of file test_sslctx.cpp.

Here is the caller graph for this function:

◆ xfer_oneway()

static bool xfer_oneway ( SSLAPI sender,
SSLAPI recv,
std::string  out 
)
inlinestatic

Definition at line 326 of file test_sslctx.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ cert_txt

const std::string cert_txt

Definition at line 128 of file test_sslctx.cpp.

◆ certcrl_txt

const std::string certcrl_txt

Definition at line 196 of file test_sslctx.cpp.

◆ dhparam_txt

const std::string dhparam_txt
Initial value:
= R"(-----BEGIN DH PARAMETERS-----
MIIBDAKCAQEA9WXZvihl5pltdS4C+Dc+Ki3KOuH0aBfSzmth/B3O0+oTN3CZXAak
WyK6dCCtXeBZ3ih3eNVO69BgoNVdbxuPIUWxo3EWFt6LteASgkjCEyTmrNd/aKAE
pS06RgsZcWs/Ps9iwcVFyE6kMi9Cbf3D2wwJT50kJmkEov+4cOH3NQVpS231I58x
rHMEMtNDFcJYCAEIG3cKqfX9unAgZUsDoLtyvfgvHV29koZxnmMt0+5f0qnezcnP
I/+4kAlXuAKdhsXohHeBhC2ijg/kTOMDxEbEVv+SkCIUyM+dB8UtlPKOH9HEL5Xi
+BpDSqO6Bha5+NAVUU7OdDsnzRwSWaD6lwIBAgICAOE=
-----END DH PARAMETERS-----)"

Definition at line 230 of file test_sslctx.cpp.

◆ fail_cert_txt

const std::string fail_cert_txt

Definition at line 162 of file test_sslctx.cpp.

◆ fail_pvt_key_txt

const std::string fail_pvt_key_txt

Definition at line 75 of file test_sslctx.cpp.

◆ pvt_key_txt

const std::string pvt_key_txt

Definition at line 22 of file test_sslctx.cpp.