Go to the documentation of this file.
45 const char *input =
"V4,dev-type tun,link-mtu 1457,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server";
49 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");
52 input =
"V4,dev-type tun,link-mtu 2,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server";
56 assert_string_equal(input, output);
59 input =
"V4,dev-type tun";
62 assert_string_equal(input, output);
65 input =
"V4,dev-type tun,link-mtu 999,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server";
69 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");
79 const char *teststr =
"TEMP:There are no flags here [really not]";
82 assert_string_equal(
msg,
"There are no flags here [really not]");
90 const char *teststr =
"[backoff 42,advance no]";
93 assert_string_equal(
msg,
"");
103 const char *teststr =
"[advance remote,backoff 77]:go round and round";
106 assert_string_equal(
msg,
"go round and round");
120 return cmocka_run_group_tests(
misc_tests, NULL, NULL);
static struct gc_arena gc_new(void)
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...