Apply uncrustify 0.70.1 (FreeBSD port) with our rules to that part
of the tree, which followed a more compact coding style so far.
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20200426095402.65047-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19823.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
| ... | ... |
@@ -7,7 +7,8 @@ |
| 7 | 7 |
#include <cmocka.h> |
| 8 | 8 |
|
| 9 | 9 |
static int |
| 10 |
-setup(void **state) {
|
|
| 10 |
+setup(void **state) |
|
| 11 |
+{
|
|
| 11 | 12 |
int *answer = malloc(sizeof(int)); |
| 12 | 13 |
|
| 13 | 14 |
*answer = 42; |
| ... | ... |
@@ -17,31 +18,36 @@ setup(void **state) {
|
| 17 | 17 |
} |
| 18 | 18 |
|
| 19 | 19 |
static int |
| 20 |
-teardown(void **state) {
|
|
| 20 |
+teardown(void **state) |
|
| 21 |
+{
|
|
| 21 | 22 |
free(*state); |
| 22 | 23 |
|
| 23 | 24 |
return 0; |
| 24 | 25 |
} |
| 25 | 26 |
|
| 26 | 27 |
static void |
| 27 |
-null_test_success(void **state) {
|
|
| 28 |
+null_test_success(void **state) |
|
| 29 |
+{
|
|
| 28 | 30 |
(void) state; |
| 29 | 31 |
} |
| 30 | 32 |
|
| 31 | 33 |
static void |
| 32 |
-int_test_success(void **state) {
|
|
| 34 |
+int_test_success(void **state) |
|
| 35 |
+{
|
|
| 33 | 36 |
int *answer = *state; |
| 34 | 37 |
assert_int_equal(*answer, 42); |
| 35 | 38 |
} |
| 36 | 39 |
|
| 37 | 40 |
static void |
| 38 |
-failing_test(void **state) {
|
|
| 41 |
+failing_test(void **state) |
|
| 42 |
+{
|
|
| 39 | 43 |
/* This tests fails to test that make check fails */ |
| 40 | 44 |
assert_int_equal(0, 42); |
| 41 | 45 |
} |
| 42 | 46 |
|
| 43 | 47 |
int |
| 44 |
-main(void) {
|
|
| 48 |
+main(void) |
|
| 49 |
+{
|
|
| 45 | 50 |
const struct CMUnitTest tests[] = {
|
| 46 | 51 |
cmocka_unit_test(null_test_success), |
| 47 | 52 |
cmocka_unit_test_setup_teardown(int_test_success, setup, teardown), |
| ... | ... |
@@ -204,7 +204,7 @@ argv_str__multiple_argv__correct_output(void **state) |
| 204 | 204 |
argv_printf_cat(&a, "%lu", 1L ); |
| 205 | 205 |
output = argv_str(&a, &gc, PA_BRACKET); |
| 206 | 206 |
assert_string_equal(output, "[" PATH1 PATH2 "] [" PARAM1 "] [" PARAM2 "]" |
| 207 |
- " [-1] [4294967295] [1]"); |
|
| 207 |
+ " [-1] [4294967295] [1]"); |
|
| 208 | 208 |
|
| 209 | 209 |
argv_free(&a); |
| 210 | 210 |
gc_free(&gc); |
| ... | ... |
@@ -234,7 +234,8 @@ argv_insert_head__non_empty_argv__head_added(void **state) |
| 234 | 234 |
argv_printf(&a, "%s", PATH2); |
| 235 | 235 |
b = argv_insert_head(&a, PATH1); |
| 236 | 236 |
assert_int_equal(b.argc, a.argc + 1); |
| 237 |
- for (i = 0; i < b.argc; i++) {
|
|
| 237 |
+ for (i = 0; i < b.argc; i++) |
|
| 238 |
+ {
|
|
| 238 | 239 |
if (i == 0) |
| 239 | 240 |
{
|
| 240 | 241 |
assert_string_equal(b.argv[i], PATH1); |
| ... | ... |
@@ -63,7 +63,8 @@ struct test_buffer_list_aggregate_ctx {
|
| 63 | 63 |
struct buffer_list *empty_buffers; |
| 64 | 64 |
}; |
| 65 | 65 |
|
| 66 |
-static int test_buffer_list_setup(void **state) |
|
| 66 |
+static int |
|
| 67 |
+test_buffer_list_setup(void **state) |
|
| 67 | 68 |
{
|
| 68 | 69 |
struct test_buffer_list_aggregate_ctx *ctx = calloc(1, sizeof(*ctx)); |
| 69 | 70 |
ctx->empty = buffer_list_new(0); |
| ... | ... |
@@ -86,7 +87,8 @@ static int test_buffer_list_setup(void **state) |
| 86 | 86 |
return 0; |
| 87 | 87 |
} |
| 88 | 88 |
|
| 89 |
-static int test_buffer_list_teardown(void **state) |
|
| 89 |
+static int |
|
| 90 |
+test_buffer_list_teardown(void **state) |
|
| 90 | 91 |
{
|
| 91 | 92 |
struct test_buffer_list_aggregate_ctx *ctx = *state; |
| 92 | 93 |
|
| ... | ... |
@@ -44,7 +44,8 @@ |
| 44 | 44 |
static const char testtext[] = "Dummy text to test PEM encoding"; |
| 45 | 45 |
|
| 46 | 46 |
static void |
| 47 |
-crypto_pem_encode_decode_loopback(void **state) {
|
|
| 47 |
+crypto_pem_encode_decode_loopback(void **state) |
|
| 48 |
+{
|
|
| 48 | 49 |
struct gc_arena gc = gc_new(); |
| 49 | 50 |
struct buffer src_buf; |
| 50 | 51 |
buf_set_read(&src_buf, (void *)testtext, sizeof(testtext)); |
| ... | ... |
@@ -69,7 +70,8 @@ crypto_pem_encode_decode_loopback(void **state) {
|
| 69 | 69 |
} |
| 70 | 70 |
|
| 71 | 71 |
int |
| 72 |
-main(void) {
|
|
| 72 |
+main(void) |
|
| 73 |
+{
|
|
| 73 | 74 |
const struct CMUnitTest tests[] = {
|
| 74 | 75 |
cmocka_unit_test(crypto_pem_encode_decode_loopback), |
| 75 | 76 |
}; |
| ... | ... |
@@ -66,12 +66,12 @@ test_check_ncp_ciphers_list(void **state) |
| 66 | 66 |
} |
| 67 | 67 |
|
| 68 | 68 |
/* For testing that with OpenSSL 1.1.0+ that also accepts ciphers in |
| 69 |
- a different spelling the normalised cipher output is the same */ |
|
| 69 |
+ * a different spelling the normalised cipher output is the same */ |
|
| 70 | 70 |
bool have_chacha_mixed_case = cipher_kt_get("ChaCha20-Poly1305");
|
| 71 | 71 |
if (have_chacha_mixed_case) |
| 72 | 72 |
{
|
| 73 |
- assert_string_equal(mutate_ncp_cipher_list("BF-CBC:ChaCha20-Poly1305", &gc),
|
|
| 74 |
- bf_chacha); |
|
| 73 |
+ assert_string_equal(mutate_ncp_cipher_list("BF-CBC:ChaCha20-Poly1305", &gc),
|
|
| 74 |
+ bf_chacha); |
|
| 75 | 75 |
} |
| 76 | 76 |
|
| 77 | 77 |
assert_ptr_equal(mutate_ncp_cipher_list("vollbit", &gc), NULL);
|
| ... | ... |
@@ -29,7 +29,9 @@ net__addr_v4_add(const char *addr_str, int prefixlen) |
| 29 | 29 |
|
| 30 | 30 |
ret = inet_pton(AF_INET, addr_str, &addr); |
| 31 | 31 |
if (ret != 1) |
| 32 |
+ {
|
|
| 32 | 33 |
return -1; |
| 34 |
+ } |
|
| 33 | 35 |
|
| 34 | 36 |
addr = ntohl(addr); |
| 35 | 37 |
|
| ... | ... |
@@ -46,7 +48,9 @@ net__addr_v6_add(const char *addr_str, int prefixlen) |
| 46 | 46 |
|
| 47 | 47 |
ret = inet_pton(AF_INET6, addr_str, &addr); |
| 48 | 48 |
if (ret != 1) |
| 49 |
+ {
|
|
| 49 | 50 |
return -1; |
| 51 |
+ } |
|
| 50 | 52 |
|
| 51 | 53 |
printf("CMD: ip -6 addr add %s/%d dev %s\n", addr_str, prefixlen, iface);
|
| 52 | 54 |
|
| ... | ... |
@@ -60,17 +64,23 @@ net__route_v4_add(const char *dst_str, int prefixlen, int metric) |
| 60 | 60 |
int ret; |
| 61 | 61 |
|
| 62 | 62 |
if (!dst_str) |
| 63 |
+ {
|
|
| 63 | 64 |
return -1; |
| 65 |
+ } |
|
| 64 | 66 |
|
| 65 | 67 |
ret = inet_pton(AF_INET, dst_str, &dst); |
| 66 | 68 |
if (ret != 1) |
| 69 |
+ {
|
|
| 67 | 70 |
return -1; |
| 71 |
+ } |
|
| 68 | 72 |
|
| 69 | 73 |
dst = ntohl(dst); |
| 70 | 74 |
|
| 71 | 75 |
printf("CMD: ip route add %s/%d dev %s", dst_str, prefixlen, iface);
|
| 72 | 76 |
if (metric > 0) |
| 77 |
+ {
|
|
| 73 | 78 |
printf(" metric %d", metric);
|
| 79 |
+ } |
|
| 74 | 80 |
printf("\n");
|
| 75 | 81 |
|
| 76 | 82 |
return net_route_v4_add(NULL, &dst, prefixlen, NULL, iface, 0, metric); |
| ... | ... |
@@ -85,15 +95,21 @@ net__route_v4_add_gw(const char *dst_str, int prefixlen, const char *gw_str, |
| 85 | 85 |
int ret; |
| 86 | 86 |
|
| 87 | 87 |
if (!dst_str || !gw_str) |
| 88 |
+ {
|
|
| 88 | 89 |
return -1; |
| 90 |
+ } |
|
| 89 | 91 |
|
| 90 | 92 |
ret = inet_pton(AF_INET, dst_str, &dst); |
| 91 | 93 |
if (ret != 1) |
| 94 |
+ {
|
|
| 92 | 95 |
return -1; |
| 96 |
+ } |
|
| 93 | 97 |
|
| 94 | 98 |
ret = inet_pton(AF_INET, gw_str, &gw); |
| 95 | 99 |
if (ret != 1) |
| 100 |
+ {
|
|
| 96 | 101 |
return -1; |
| 102 |
+ } |
|
| 97 | 103 |
|
| 98 | 104 |
dst = ntohl(dst); |
| 99 | 105 |
gw = ntohl(gw); |
| ... | ... |
@@ -101,7 +117,9 @@ net__route_v4_add_gw(const char *dst_str, int prefixlen, const char *gw_str, |
| 101 | 101 |
printf("CMD: ip route add %s/%d dev %s via %s", dst_str, prefixlen, iface,
|
| 102 | 102 |
gw_str); |
| 103 | 103 |
if (metric > 0) |
| 104 |
+ {
|
|
| 104 | 105 |
printf(" metric %d", metric);
|
| 106 |
+ } |
|
| 105 | 107 |
printf("\n");
|
| 106 | 108 |
|
| 107 | 109 |
return net_route_v4_add(NULL, &dst, prefixlen, &gw, iface, 0, metric); |
| ... | ... |
@@ -114,15 +132,21 @@ net__route_v6_add(const char *dst_str, int prefixlen, int metric) |
| 114 | 114 |
int ret; |
| 115 | 115 |
|
| 116 | 116 |
if (!dst_str) |
| 117 |
+ {
|
|
| 117 | 118 |
return -1; |
| 119 |
+ } |
|
| 118 | 120 |
|
| 119 | 121 |
ret = inet_pton(AF_INET6, dst_str, &dst); |
| 120 | 122 |
if (ret != 1) |
| 123 |
+ {
|
|
| 121 | 124 |
return -1; |
| 125 |
+ } |
|
| 122 | 126 |
|
| 123 | 127 |
printf("CMD: ip -6 route add %s/%d dev %s", dst_str, prefixlen, iface);
|
| 124 | 128 |
if (metric > 0) |
| 129 |
+ {
|
|
| 125 | 130 |
printf(" metric %d", metric);
|
| 131 |
+ } |
|
| 126 | 132 |
printf("\n");
|
| 127 | 133 |
|
| 128 | 134 |
return net_route_v6_add(NULL, &dst, prefixlen, NULL, iface, 0, metric); |
| ... | ... |
@@ -137,20 +161,28 @@ net__route_v6_add_gw(const char *dst_str, int prefixlen, const char *gw_str, |
| 137 | 137 |
int ret; |
| 138 | 138 |
|
| 139 | 139 |
if (!dst_str || !gw_str) |
| 140 |
+ {
|
|
| 140 | 141 |
return -1; |
| 142 |
+ } |
|
| 141 | 143 |
|
| 142 | 144 |
ret = inet_pton(AF_INET6, dst_str, &dst); |
| 143 | 145 |
if (ret != 1) |
| 146 |
+ {
|
|
| 144 | 147 |
return -1; |
| 148 |
+ } |
|
| 145 | 149 |
|
| 146 | 150 |
ret = inet_pton(AF_INET6, gw_str, &gw); |
| 147 | 151 |
if (ret != 1) |
| 152 |
+ {
|
|
| 148 | 153 |
return -1; |
| 154 |
+ } |
|
| 149 | 155 |
|
| 150 | 156 |
printf("CMD: ip -6 route add %s/%d dev %s via %s", dst_str, prefixlen,
|
| 151 | 157 |
iface, gw_str); |
| 152 | 158 |
if (metric > 0) |
| 159 |
+ {
|
|
| 153 | 160 |
printf(" metric %d", metric);
|
| 161 |
+ } |
|
| 154 | 162 |
printf("\n");
|
| 155 | 163 |
|
| 156 | 164 |
return net_route_v6_add(NULL, &dst, prefixlen, &gw, iface, 0, metric); |
| ... | ... |
@@ -189,20 +221,28 @@ main(int argc, char *argv[]) |
| 189 | 189 |
{
|
| 190 | 190 |
case 0: |
| 191 | 191 |
return net__iface_up(true); |
| 192 |
+ |
|
| 192 | 193 |
case 1: |
| 193 | 194 |
return net__iface_mtu_set(1281); |
| 195 |
+ |
|
| 194 | 196 |
case 2: |
| 195 | 197 |
return net__addr_v4_add("10.255.255.1", 24);
|
| 198 |
+ |
|
| 196 | 199 |
case 3: |
| 197 | 200 |
return net__addr_v6_add("2001::1", 64);
|
| 201 |
+ |
|
| 198 | 202 |
case 4: |
| 199 | 203 |
return net__route_v4_add("11.11.11.0", 24, 0);
|
| 204 |
+ |
|
| 200 | 205 |
case 5: |
| 201 | 206 |
return net__route_v4_add_gw("11.11.12.0", 24, "10.255.255.2", 0);
|
| 207 |
+ |
|
| 202 | 208 |
case 6: |
| 203 | 209 |
return net__route_v6_add("2001:babe:cafe:babe::", 64, 600);
|
| 210 |
+ |
|
| 204 | 211 |
case 7: |
| 205 | 212 |
return net__route_v6_add_gw("2001:cafe:babe::", 48, "2001::2", 600);
|
| 213 |
+ |
|
| 206 | 214 |
default: |
| 207 | 215 |
printf("invalid test: %d\n", test);
|
| 208 | 216 |
break; |
| ... | ... |
@@ -49,9 +49,10 @@ struct test_packet_id_write_data {
|
| 49 | 49 |
}; |
| 50 | 50 |
|
| 51 | 51 |
static int |
| 52 |
-test_packet_id_write_setup(void **state) {
|
|
| 52 |
+test_packet_id_write_setup(void **state) |
|
| 53 |
+{
|
|
| 53 | 54 |
struct test_packet_id_write_data *data = |
| 54 |
- calloc(1, sizeof(struct test_packet_id_write_data)); |
|
| 55 |
+ calloc(1, sizeof(struct test_packet_id_write_data)); |
|
| 55 | 56 |
|
| 56 | 57 |
if (!data) |
| 57 | 58 |
{
|
| ... | ... |
@@ -66,7 +67,8 @@ test_packet_id_write_setup(void **state) {
|
| 66 | 66 |
} |
| 67 | 67 |
|
| 68 | 68 |
static int |
| 69 |
-test_packet_id_write_teardown(void **state) {
|
|
| 69 |
+test_packet_id_write_teardown(void **state) |
|
| 70 |
+{
|
|
| 70 | 71 |
free(*state); |
| 71 | 72 |
return 0; |
| 72 | 73 |
} |
| ... | ... |
@@ -155,20 +157,27 @@ test_packet_id_write_long_wrap(void **state) |
| 155 | 155 |
} |
| 156 | 156 |
|
| 157 | 157 |
int |
| 158 |
-main(void) {
|
|
| 158 |
+main(void) |
|
| 159 |
+{
|
|
| 159 | 160 |
const struct CMUnitTest tests[] = {
|
| 160 |
- cmocka_unit_test_setup_teardown(test_packet_id_write_short, |
|
| 161 |
- test_packet_id_write_setup, test_packet_id_write_teardown), |
|
| 162 |
- cmocka_unit_test_setup_teardown(test_packet_id_write_long, |
|
| 163 |
- test_packet_id_write_setup, test_packet_id_write_teardown), |
|
| 164 |
- cmocka_unit_test_setup_teardown(test_packet_id_write_short_prepend, |
|
| 165 |
- test_packet_id_write_setup, test_packet_id_write_teardown), |
|
| 166 |
- cmocka_unit_test_setup_teardown(test_packet_id_write_long_prepend, |
|
| 167 |
- test_packet_id_write_setup, test_packet_id_write_teardown), |
|
| 168 |
- cmocka_unit_test_setup_teardown(test_packet_id_write_short_wrap, |
|
| 169 |
- test_packet_id_write_setup, test_packet_id_write_teardown), |
|
| 170 |
- cmocka_unit_test_setup_teardown(test_packet_id_write_long_wrap, |
|
| 171 |
- test_packet_id_write_setup, test_packet_id_write_teardown), |
|
| 161 |
+ cmocka_unit_test_setup_teardown(test_packet_id_write_short, |
|
| 162 |
+ test_packet_id_write_setup, |
|
| 163 |
+ test_packet_id_write_teardown), |
|
| 164 |
+ cmocka_unit_test_setup_teardown(test_packet_id_write_long, |
|
| 165 |
+ test_packet_id_write_setup, |
|
| 166 |
+ test_packet_id_write_teardown), |
|
| 167 |
+ cmocka_unit_test_setup_teardown(test_packet_id_write_short_prepend, |
|
| 168 |
+ test_packet_id_write_setup, |
|
| 169 |
+ test_packet_id_write_teardown), |
|
| 170 |
+ cmocka_unit_test_setup_teardown(test_packet_id_write_long_prepend, |
|
| 171 |
+ test_packet_id_write_setup, |
|
| 172 |
+ test_packet_id_write_teardown), |
|
| 173 |
+ cmocka_unit_test_setup_teardown(test_packet_id_write_short_wrap, |
|
| 174 |
+ test_packet_id_write_setup, |
|
| 175 |
+ test_packet_id_write_teardown), |
|
| 176 |
+ cmocka_unit_test_setup_teardown(test_packet_id_write_long_wrap, |
|
| 177 |
+ test_packet_id_write_setup, |
|
| 178 |
+ test_packet_id_write_teardown), |
|
| 172 | 179 |
}; |
| 173 | 180 |
|
| 174 | 181 |
return cmocka_run_group_tests_name("packet_id tests", tests, NULL, NULL);
|
| ... | ... |
@@ -50,45 +50,45 @@ |
| 50 | 50 |
#define PARAM2 "param two" |
| 51 | 51 |
|
| 52 | 52 |
static const char *test_server_key = \ |
| 53 |
- "-----BEGIN OpenVPN tls-crypt-v2 server key-----\n" |
|
| 54 |
- "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4v\n" |
|
| 55 |
- "MDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5f\n" |
|
| 56 |
- "YGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn8=\n" |
|
| 57 |
- "-----END OpenVPN tls-crypt-v2 server key-----\n"; |
|
| 53 |
+ "-----BEGIN OpenVPN tls-crypt-v2 server key-----\n" |
|
| 54 |
+ "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4v\n" |
|
| 55 |
+ "MDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5f\n" |
|
| 56 |
+ "YGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn8=\n" |
|
| 57 |
+ "-----END OpenVPN tls-crypt-v2 server key-----\n"; |
|
| 58 | 58 |
|
| 59 | 59 |
static const char *test_client_key = \ |
| 60 |
- "-----BEGIN OpenVPN tls-crypt-v2 client key-----\n" |
|
| 61 |
- "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4v\n" |
|
| 62 |
- "MDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5f\n" |
|
| 63 |
- "YGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6P\n" |
|
| 64 |
- "kJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/\n" |
|
| 65 |
- "wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v\n" |
|
| 66 |
- "8PHy8/T19vf4+fr7/P3+/xd9pcB0qUYZsWvkrLcfGmzPJPM8a7r0mEWdXwbDadSV\n" |
|
| 67 |
- "LHg5bv2TwlmPR3HgaMr8o9LTh9hxUTkrH3S0PfKRNwcso86ua/dBFTyXsM9tg4aw\n" |
|
| 68 |
- "3dS6ogH9AkaT+kRRDgNcKWkQCbwmJK2JlfkXHBwbAtmn78AkNuho6QCFqCdqGab3\n" |
|
| 69 |
- "zh2vheFqGMPdGpukbFrT3rcO3VLxUeG+RdzXiMTCpJSovFBP1lDkYwYJPnz6daEh\n" |
|
| 70 |
- "j0TzJ3BVru9W3CpotdNt7u09knxAfpCxjtrP3semsDew/gTBtcfQ/OoTFyFHnN5k\n" |
|
| 71 |
- "RZ+q17SC4nba3Pp8/Fs0+hSbv2tJozoD8SElFq7SIWJsciTYh8q8f5yQxjdt4Wxu\n" |
|
| 72 |
- "/Z5wtPCAZ0tOzj4ItTI77fBOYRTfEayzHgEr\n" |
|
| 73 |
- "-----END OpenVPN tls-crypt-v2 client key-----\n"; |
|
| 60 |
+ "-----BEGIN OpenVPN tls-crypt-v2 client key-----\n" |
|
| 61 |
+ "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4v\n" |
|
| 62 |
+ "MDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5f\n" |
|
| 63 |
+ "YGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6P\n" |
|
| 64 |
+ "kJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/\n" |
|
| 65 |
+ "wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v\n" |
|
| 66 |
+ "8PHy8/T19vf4+fr7/P3+/xd9pcB0qUYZsWvkrLcfGmzPJPM8a7r0mEWdXwbDadSV\n" |
|
| 67 |
+ "LHg5bv2TwlmPR3HgaMr8o9LTh9hxUTkrH3S0PfKRNwcso86ua/dBFTyXsM9tg4aw\n" |
|
| 68 |
+ "3dS6ogH9AkaT+kRRDgNcKWkQCbwmJK2JlfkXHBwbAtmn78AkNuho6QCFqCdqGab3\n" |
|
| 69 |
+ "zh2vheFqGMPdGpukbFrT3rcO3VLxUeG+RdzXiMTCpJSovFBP1lDkYwYJPnz6daEh\n" |
|
| 70 |
+ "j0TzJ3BVru9W3CpotdNt7u09knxAfpCxjtrP3semsDew/gTBtcfQ/OoTFyFHnN5k\n" |
|
| 71 |
+ "RZ+q17SC4nba3Pp8/Fs0+hSbv2tJozoD8SElFq7SIWJsciTYh8q8f5yQxjdt4Wxu\n" |
|
| 72 |
+ "/Z5wtPCAZ0tOzj4ItTI77fBOYRTfEayzHgEr\n" |
|
| 73 |
+ "-----END OpenVPN tls-crypt-v2 client key-----\n"; |
|
| 74 | 74 |
|
| 75 | 75 |
|
| 76 | 76 |
/* Has custom metadata of AABBCCDD (base64) */ |
| 77 |
-static const char *test_client_key_metadata= \ |
|
| 78 |
- "-----BEGIN OpenVPN tls-crypt-v2 client key-----\n" |
|
| 79 |
- "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4v\n" |
|
| 80 |
- "MDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5f\n" |
|
| 81 |
- "YGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6P\n" |
|
| 82 |
- "kJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/\n" |
|
| 83 |
- "wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v\n" |
|
| 84 |
- "8PHy8/T19vf4+fr7/P3+/2ntp1WCqhcLjJQY/igkjNt3Yb6i0neqFkfrOp2UCDcz\n" |
|
| 85 |
- "6RSJtPLZbvOOKUHk2qwxPYUsFCnz/IWV6/ZiLRrabzUpS8oSN1HS6P7qqAdrHKgf\n" |
|
| 86 |
- "hVTHasdSf2UdMTPC7HBgnP9Ll0FhKN0h7vSzbbt7QM7wH9mr1ecc/Mt0SYW2lpwA\n" |
|
| 87 |
- "aJObYGTyk6hTgWm0g/MLrworLrezTqUHBZzVsu+LDyqLWK1lzJNd66MuNOsGA4YF\n" |
|
| 88 |
- "fbCsDh8n3H+Cw1k5YNBZDYYJOtVUgBWXheO6vgoOmqDdI0dAQ3hVo9DE+SkCFjgf\n" |
|
| 89 |
- "l4FY2yLEh9ZVZZrl1eD1Owh/X178CkHrBJYl9LNQSyQEKlDGWwBLQ/pY3qtjctr3\n" |
|
| 90 |
- "pV62MPQdBo+1lcsjDCJVQA6XUyltas4BKQ==\n" |
|
| 91 |
- "-----END OpenVPN tls-crypt-v2 client key-----\n"; |
|
| 77 |
+static const char *test_client_key_metadata = \ |
|
| 78 |
+ "-----BEGIN OpenVPN tls-crypt-v2 client key-----\n" |
|
| 79 |
+ "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4v\n" |
|
| 80 |
+ "MDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5f\n" |
|
| 81 |
+ "YGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6P\n" |
|
| 82 |
+ "kJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/\n" |
|
| 83 |
+ "wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v\n" |
|
| 84 |
+ "8PHy8/T19vf4+fr7/P3+/2ntp1WCqhcLjJQY/igkjNt3Yb6i0neqFkfrOp2UCDcz\n" |
|
| 85 |
+ "6RSJtPLZbvOOKUHk2qwxPYUsFCnz/IWV6/ZiLRrabzUpS8oSN1HS6P7qqAdrHKgf\n" |
|
| 86 |
+ "hVTHasdSf2UdMTPC7HBgnP9Ll0FhKN0h7vSzbbt7QM7wH9mr1ecc/Mt0SYW2lpwA\n" |
|
| 87 |
+ "aJObYGTyk6hTgWm0g/MLrworLrezTqUHBZzVsu+LDyqLWK1lzJNd66MuNOsGA4YF\n" |
|
| 88 |
+ "fbCsDh8n3H+Cw1k5YNBZDYYJOtVUgBWXheO6vgoOmqDdI0dAQ3hVo9DE+SkCFjgf\n" |
|
| 89 |
+ "l4FY2yLEh9ZVZZrl1eD1Owh/X178CkHrBJYl9LNQSyQEKlDGWwBLQ/pY3qtjctr3\n" |
|
| 90 |
+ "pV62MPQdBo+1lcsjDCJVQA6XUyltas4BKQ==\n" |
|
| 91 |
+ "-----END OpenVPN tls-crypt-v2 client key-----\n"; |
|
| 92 | 92 |
|
| 93 | 93 |
int |
| 94 | 94 |
__wrap_parse_line(const char *line, char **p, const int n, const char *file, |
| ... | ... |
@@ -143,7 +143,8 @@ struct test_tls_crypt_context {
|
| 143 | 143 |
}; |
| 144 | 144 |
|
| 145 | 145 |
static int |
| 146 |
-test_tls_crypt_setup(void **state) {
|
|
| 146 |
+test_tls_crypt_setup(void **state) |
|
| 147 |
+{
|
|
| 147 | 148 |
struct test_tls_crypt_context *ctx = calloc(1, sizeof(*ctx)); |
| 148 | 149 |
*state = ctx; |
| 149 | 150 |
|
| ... | ... |
@@ -175,9 +176,10 @@ test_tls_crypt_setup(void **state) {
|
| 175 | 175 |
} |
| 176 | 176 |
|
| 177 | 177 |
static int |
| 178 |
-test_tls_crypt_teardown(void **state) {
|
|
| 178 |
+test_tls_crypt_teardown(void **state) |
|
| 179 |
+{
|
|
| 179 | 180 |
struct test_tls_crypt_context *ctx = |
| 180 |
- (struct test_tls_crypt_context *)*state; |
|
| 181 |
+ (struct test_tls_crypt_context *)*state; |
|
| 181 | 182 |
|
| 182 | 183 |
free_buf(&ctx->source); |
| 183 | 184 |
free_buf(&ctx->ciphertext); |
| ... | ... |
@@ -190,7 +192,8 @@ test_tls_crypt_teardown(void **state) {
|
| 190 | 190 |
return 0; |
| 191 | 191 |
} |
| 192 | 192 |
|
| 193 |
-static void skip_if_tls_crypt_not_supported(struct test_tls_crypt_context *ctx) |
|
| 193 |
+static void |
|
| 194 |
+skip_if_tls_crypt_not_supported(struct test_tls_crypt_context *ctx) |
|
| 194 | 195 |
{
|
| 195 | 196 |
if (!ctx->kt.cipher || !ctx->kt.digest) |
| 196 | 197 |
{
|
| ... | ... |
@@ -202,7 +205,8 @@ static void skip_if_tls_crypt_not_supported(struct test_tls_crypt_context *ctx) |
| 202 | 202 |
* Check that short messages are successfully wrapped-and-unwrapped. |
| 203 | 203 |
*/ |
| 204 | 204 |
static void |
| 205 |
-tls_crypt_loopback(void **state) {
|
|
| 205 |
+tls_crypt_loopback(void **state) |
|
| 206 |
+{
|
|
| 206 | 207 |
struct test_tls_crypt_context *ctx = (struct test_tls_crypt_context *) *state; |
| 207 | 208 |
|
| 208 | 209 |
skip_if_tls_crypt_not_supported(ctx); |
| ... | ... |
@@ -219,7 +223,8 @@ tls_crypt_loopback(void **state) {
|
| 219 | 219 |
* Check that zero-byte messages are successfully wrapped-and-unwrapped. |
| 220 | 220 |
*/ |
| 221 | 221 |
static void |
| 222 |
-tls_crypt_loopback_zero_len(void **state) {
|
|
| 222 |
+tls_crypt_loopback_zero_len(void **state) |
|
| 223 |
+{
|
|
| 223 | 224 |
struct test_tls_crypt_context *ctx = (struct test_tls_crypt_context *) *state; |
| 224 | 225 |
|
| 225 | 226 |
skip_if_tls_crypt_not_supported(ctx); |
| ... | ... |
@@ -238,7 +243,8 @@ tls_crypt_loopback_zero_len(void **state) {
|
| 238 | 238 |
* Check that max-length messages are successfully wrapped-and-unwrapped. |
| 239 | 239 |
*/ |
| 240 | 240 |
static void |
| 241 |
-tls_crypt_loopback_max_len(void **state) {
|
|
| 241 |
+tls_crypt_loopback_max_len(void **state) |
|
| 242 |
+{
|
|
| 242 | 243 |
struct test_tls_crypt_context *ctx = (struct test_tls_crypt_context *) *state; |
| 243 | 244 |
|
| 244 | 245 |
skip_if_tls_crypt_not_supported(ctx); |
| ... | ... |
@@ -259,7 +265,8 @@ tls_crypt_loopback_max_len(void **state) {
|
| 259 | 259 |
* Check that too-long messages are gracefully rejected. |
| 260 | 260 |
*/ |
| 261 | 261 |
static void |
| 262 |
-tls_crypt_fail_msg_too_long(void **state) {
|
|
| 262 |
+tls_crypt_fail_msg_too_long(void **state) |
|
| 263 |
+{
|
|
| 263 | 264 |
struct test_tls_crypt_context *ctx = (struct test_tls_crypt_context *) *state; |
| 264 | 265 |
|
| 265 | 266 |
skip_if_tls_crypt_not_supported(ctx); |
| ... | ... |
@@ -275,7 +282,8 @@ tls_crypt_fail_msg_too_long(void **state) {
|
| 275 | 275 |
* are not accepted. |
| 276 | 276 |
*/ |
| 277 | 277 |
static void |
| 278 |
-tls_crypt_fail_invalid_key(void **state) {
|
|
| 278 |
+tls_crypt_fail_invalid_key(void **state) |
|
| 279 |
+{
|
|
| 279 | 280 |
struct test_tls_crypt_context *ctx = (struct test_tls_crypt_context *) *state; |
| 280 | 281 |
|
| 281 | 282 |
skip_if_tls_crypt_not_supported(ctx); |
| ... | ... |
@@ -294,7 +302,8 @@ tls_crypt_fail_invalid_key(void **state) {
|
| 294 | 294 |
* Check that replayed packets are not accepted. |
| 295 | 295 |
*/ |
| 296 | 296 |
static void |
| 297 |
-tls_crypt_fail_replay(void **state) {
|
|
| 297 |
+tls_crypt_fail_replay(void **state) |
|
| 298 |
+{
|
|
| 298 | 299 |
struct test_tls_crypt_context *ctx = (struct test_tls_crypt_context *) *state; |
| 299 | 300 |
|
| 300 | 301 |
skip_if_tls_crypt_not_supported(ctx); |
| ... | ... |
@@ -313,7 +322,8 @@ tls_crypt_fail_replay(void **state) {
|
| 313 | 313 |
* know the packet ID yet. |
| 314 | 314 |
*/ |
| 315 | 315 |
static void |
| 316 |
-tls_crypt_ignore_replay(void **state) {
|
|
| 316 |
+tls_crypt_ignore_replay(void **state) |
|
| 317 |
+{
|
|
| 317 | 318 |
struct test_tls_crypt_context *ctx = (struct test_tls_crypt_context *) *state; |
| 318 | 319 |
|
| 319 | 320 |
skip_if_tls_crypt_not_supported(ctx); |
| ... | ... |
@@ -340,7 +350,8 @@ struct test_tls_crypt_v2_context {
|
| 340 | 340 |
}; |
| 341 | 341 |
|
| 342 | 342 |
static int |
| 343 |
-test_tls_crypt_v2_setup(void **state) {
|
|
| 343 |
+test_tls_crypt_v2_setup(void **state) |
|
| 344 |
+{
|
|
| 344 | 345 |
struct test_tls_crypt_v2_context *ctx = calloc(1, sizeof(*ctx)); |
| 345 | 346 |
*state = ctx; |
| 346 | 347 |
|
| ... | ... |
@@ -368,9 +379,10 @@ test_tls_crypt_v2_setup(void **state) {
|
| 368 | 368 |
} |
| 369 | 369 |
|
| 370 | 370 |
static int |
| 371 |
-test_tls_crypt_v2_teardown(void **state) {
|
|
| 371 |
+test_tls_crypt_v2_teardown(void **state) |
|
| 372 |
+{
|
|
| 372 | 373 |
struct test_tls_crypt_v2_context *ctx = |
| 373 |
- (struct test_tls_crypt_v2_context *) *state; |
|
| 374 |
+ (struct test_tls_crypt_v2_context *) *state; |
|
| 374 | 375 |
|
| 375 | 376 |
free_key_ctx_bi(&ctx->server_keys); |
| 376 | 377 |
free_key_ctx_bi(&ctx->client_key); |
| ... | ... |
@@ -386,9 +398,10 @@ test_tls_crypt_v2_teardown(void **state) {
|
| 386 | 386 |
* Check wrapping and unwrapping a tls-crypt-v2 client key without metadata. |
| 387 | 387 |
*/ |
| 388 | 388 |
static void |
| 389 |
-tls_crypt_v2_wrap_unwrap_no_metadata(void **state) {
|
|
| 389 |
+tls_crypt_v2_wrap_unwrap_no_metadata(void **state) |
|
| 390 |
+{
|
|
| 390 | 391 |
struct test_tls_crypt_v2_context *ctx = |
| 391 |
- (struct test_tls_crypt_v2_context *) *state; |
|
| 392 |
+ (struct test_tls_crypt_v2_context *) *state; |
|
| 392 | 393 |
|
| 393 | 394 |
struct buffer wrapped_client_key = alloc_buf_gc(TLS_CRYPT_V2_MAX_WKC_LEN, |
| 394 | 395 |
&ctx->gc); |
| ... | ... |
@@ -415,12 +428,13 @@ tls_crypt_v2_wrap_unwrap_no_metadata(void **state) {
|
| 415 | 415 |
* metadata. |
| 416 | 416 |
*/ |
| 417 | 417 |
static void |
| 418 |
-tls_crypt_v2_wrap_unwrap_max_metadata(void **state) {
|
|
| 418 |
+tls_crypt_v2_wrap_unwrap_max_metadata(void **state) |
|
| 419 |
+{
|
|
| 419 | 420 |
struct test_tls_crypt_v2_context *ctx = |
| 420 |
- (struct test_tls_crypt_v2_context *) *state; |
|
| 421 |
+ (struct test_tls_crypt_v2_context *) *state; |
|
| 421 | 422 |
|
| 422 |
- uint8_t* metadata = |
|
| 423 |
- buf_write_alloc(&ctx->metadata, TLS_CRYPT_V2_MAX_METADATA_LEN); |
|
| 423 |
+ uint8_t *metadata = |
|
| 424 |
+ buf_write_alloc(&ctx->metadata, TLS_CRYPT_V2_MAX_METADATA_LEN); |
|
| 424 | 425 |
assert_true(rand_bytes(metadata, TLS_CRYPT_V2_MAX_METADATA_LEN)); |
| 425 | 426 |
assert_true(tls_crypt_v2_wrap_client_key(&ctx->wkc, &ctx->client_key2, |
| 426 | 427 |
&ctx->metadata, |
| ... | ... |
@@ -439,8 +453,8 @@ tls_crypt_v2_wrap_unwrap_max_metadata(void **state) {
|
| 439 | 439 |
assert_true(buf_equal(&ctx->metadata, &unwrap_metadata)); |
| 440 | 440 |
|
| 441 | 441 |
struct tls_wrap_ctx wrap_ctx = {
|
| 442 |
- .mode = TLS_WRAP_CRYPT, |
|
| 443 |
- .tls_crypt_v2_server_key = ctx->server_keys.encrypt, |
|
| 442 |
+ .mode = TLS_WRAP_CRYPT, |
|
| 443 |
+ .tls_crypt_v2_server_key = ctx->server_keys.encrypt, |
|
| 444 | 444 |
}; |
| 445 | 445 |
assert_true(tls_crypt_v2_extract_client_key(&ctx->wkc, &wrap_ctx, NULL)); |
| 446 | 446 |
tls_wrap_free(&wrap_ctx); |
| ... | ... |
@@ -451,9 +465,10 @@ tls_crypt_v2_wrap_unwrap_max_metadata(void **state) {
|
| 451 | 451 |
* as expected. |
| 452 | 452 |
*/ |
| 453 | 453 |
static void |
| 454 |
-tls_crypt_v2_wrap_too_long_metadata(void **state) {
|
|
| 454 |
+tls_crypt_v2_wrap_too_long_metadata(void **state) |
|
| 455 |
+{
|
|
| 455 | 456 |
struct test_tls_crypt_v2_context *ctx = |
| 456 |
- (struct test_tls_crypt_v2_context *) *state; |
|
| 457 |
+ (struct test_tls_crypt_v2_context *) *state; |
|
| 457 | 458 |
|
| 458 | 459 |
assert_true(buf_inc_len(&ctx->metadata, TLS_CRYPT_V2_MAX_METADATA_LEN+1)); |
| 459 | 460 |
assert_false(tls_crypt_v2_wrap_client_key(&ctx->wkc, &ctx->client_key2, |
| ... | ... |
@@ -467,9 +482,10 @@ tls_crypt_v2_wrap_too_long_metadata(void **state) {
|
| 467 | 467 |
* fails as expected. |
| 468 | 468 |
*/ |
| 469 | 469 |
static void |
| 470 |
-tls_crypt_v2_wrap_unwrap_wrong_key(void **state) {
|
|
| 470 |
+tls_crypt_v2_wrap_unwrap_wrong_key(void **state) |
|
| 471 |
+{
|
|
| 471 | 472 |
struct test_tls_crypt_v2_context *ctx = |
| 472 |
- (struct test_tls_crypt_v2_context *) *state; |
|
| 473 |
+ (struct test_tls_crypt_v2_context *) *state; |
|
| 473 | 474 |
|
| 474 | 475 |
assert_true(tls_crypt_v2_wrap_client_key(&ctx->wkc, &ctx->client_key2, |
| 475 | 476 |
&ctx->metadata, |
| ... | ... |
@@ -501,12 +517,13 @@ tls_crypt_v2_wrap_unwrap_wrong_key(void **state) {
|
| 501 | 501 |
* buffer fails as expected. |
| 502 | 502 |
*/ |
| 503 | 503 |
static void |
| 504 |
-tls_crypt_v2_wrap_unwrap_dst_too_small(void **state) {
|
|
| 504 |
+tls_crypt_v2_wrap_unwrap_dst_too_small(void **state) |
|
| 505 |
+{
|
|
| 505 | 506 |
struct test_tls_crypt_v2_context *ctx = |
| 506 |
- (struct test_tls_crypt_v2_context *) *state; |
|
| 507 |
+ (struct test_tls_crypt_v2_context *) *state; |
|
| 507 | 508 |
|
| 508 |
- uint8_t* metadata = |
|
| 509 |
- buf_write_alloc(&ctx->metadata, TLS_CRYPT_V2_MAX_METADATA_LEN); |
|
| 509 |
+ uint8_t *metadata = |
|
| 510 |
+ buf_write_alloc(&ctx->metadata, TLS_CRYPT_V2_MAX_METADATA_LEN); |
|
| 510 | 511 |
assert_true(rand_bytes(metadata, TLS_CRYPT_V2_MAX_METADATA_LEN)); |
| 511 | 512 |
assert_true(tls_crypt_v2_wrap_client_key(&ctx->wkc, &ctx->client_key2, |
| 512 | 513 |
&ctx->metadata, |
| ... | ... |
@@ -515,7 +532,7 @@ tls_crypt_v2_wrap_unwrap_dst_too_small(void **state) {
|
| 515 | 515 |
|
| 516 | 516 |
struct key2 unwrapped_client_key2 = { 0 };
|
| 517 | 517 |
struct buffer unwrapped_metadata = |
| 518 |
- alloc_buf_gc(TLS_CRYPT_V2_MAX_METADATA_LEN-1, &ctx->gc); |
|
| 518 |
+ alloc_buf_gc(TLS_CRYPT_V2_MAX_METADATA_LEN-1, &ctx->gc); |
|
| 519 | 519 |
assert_false(tls_crypt_v2_unwrap_client_key(&unwrapped_client_key2, |
| 520 | 520 |
&unwrapped_metadata, ctx->wkc, |
| 521 | 521 |
&ctx->server_keys.decrypt)); |
| ... | ... |
@@ -526,7 +543,8 @@ tls_crypt_v2_wrap_unwrap_dst_too_small(void **state) {
|
| 526 | 526 |
} |
| 527 | 527 |
|
| 528 | 528 |
static void |
| 529 |
-test_tls_crypt_v2_write_server_key_file(void **state) {
|
|
| 529 |
+test_tls_crypt_v2_write_server_key_file(void **state) |
|
| 530 |
+{
|
|
| 530 | 531 |
const char *filename = "testfilename.key"; |
| 531 | 532 |
|
| 532 | 533 |
expect_string(__wrap_buffer_write_file, filename, filename); |
| ... | ... |
@@ -537,7 +555,8 @@ test_tls_crypt_v2_write_server_key_file(void **state) {
|
| 537 | 537 |
} |
| 538 | 538 |
|
| 539 | 539 |
static void |
| 540 |
-test_tls_crypt_v2_write_client_key_file(void **state) {
|
|
| 540 |
+test_tls_crypt_v2_write_client_key_file(void **state) |
|
| 541 |
+{
|
|
| 541 | 542 |
const char *filename = "testfilename.key"; |
| 542 | 543 |
|
| 543 | 544 |
/* Test writing the client key */ |
| ... | ... |
@@ -550,11 +569,12 @@ test_tls_crypt_v2_write_client_key_file(void **state) {
|
| 550 | 550 |
will_return(__wrap_buffer_read_from_file, test_client_key); |
| 551 | 551 |
|
| 552 | 552 |
tls_crypt_v2_write_client_key_file(filename, NULL, INLINE_FILE_TAG, |
| 553 |
- test_server_key); |
|
| 553 |
+ test_server_key); |
|
| 554 | 554 |
} |
| 555 | 555 |
|
| 556 | 556 |
static void |
| 557 |
-test_tls_crypt_v2_write_client_key_file_metadata(void **state) {
|
|
| 557 |
+test_tls_crypt_v2_write_client_key_file_metadata(void **state) |
|
| 558 |
+{
|
|
| 558 | 559 |
const char *filename = "testfilename.key"; |
| 559 | 560 |
const char *b64metadata = "AABBCCDD"; |
| 560 | 561 |
|
| ... | ... |
@@ -572,7 +592,8 @@ test_tls_crypt_v2_write_client_key_file_metadata(void **state) {
|
| 572 | 572 |
} |
| 573 | 573 |
|
| 574 | 574 |
int |
| 575 |
-main(void) {
|
|
| 575 |
+main(void) |
|
| 576 |
+{
|
|
| 576 | 577 |
const struct CMUnitTest tests[] = {
|
| 577 | 578 |
cmocka_unit_test_setup_teardown(tls_crypt_loopback, |
| 578 | 579 |
test_tls_crypt_setup, |