Go to the documentation of this file.
46 const char *input =
"V4,dev-type tun,link-mtu 1457,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server";
50 assert_string_equal(output,
"V4,dev-type tun,link-mtu 1458,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server,comp-lzo");
53 input =
"V4,dev-type tun,link-mtu 2,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server";
57 assert_string_equal(input, output);
60 input =
"V4,dev-type tun";
63 assert_string_equal(input, output);
66 input =
"V4,dev-type tun,link-mtu 999,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server";
70 assert_string_equal(output,
"V4,dev-type tun,link-mtu 1000,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server,comp-lzo");
80 const char *teststr =
"TEMP:There are no flags here [really not]";
83 assert_string_equal(
msg,
"There are no flags here [really not]");
91 const char *teststr =
"[backoff 42,advance no]";
94 assert_string_equal(
msg,
"");
104 const char *teststr =
"[advance remote,backoff 77]:go round and round";
107 assert_string_equal(
msg,
"go round and round");
122 return cmocka_run_group_tests(
misc_tests, NULL, NULL);
static struct gc_arena gc_new(void)
static void openvpn_unit_test_setup()
Sets up the environment for unit tests like making both stderr and stdout non-buffered to avoid messa...
static void test_auth_fail_temp_flags(void **state)
const char * parse_auth_failed_temp(struct options *o, const char *reason)
const struct CMUnitTest misc_tests[]
static void test_auth_fail_temp_flags_msg(void **state)
Garbage collection arena used to keep track of dynamically allocated memory.
static void test_compat_lzo_string(void **state)
static void test_auth_fail_temp_no_flags(void **state)
static void gc_free(struct gc_arena *a)
const char * options_string_compat_lzo(const char *options, struct gc_arena *gc)
Takes a locally produced OCC string for TLS server mode and modifies as if the option comp-lzo was en...