|
OpenVPN
|
#include "syshead.h"#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include <string.h>#include <setjmp.h>#include <cmocka.h>#include "acc.h"#include "test_acc.h"#include "test_common.h"#include "mock_msg.h"#include "multi.h"
Go to the source code of this file.
Macros | |
| #define | MSG_PAYLOAD |
Functions | |
| bool | send_control_channel_string_dowork (struct tls_session *session, const char *str, unsigned int msglevel) |
| void | send_push_reply_auth_token (struct tls_multi *multi) |
| Sends a push reply message only containin the auth-token to update the auth-token on the client. | |
| void | auth_set_client_reason (struct tls_multi *multi, const char *reason) |
| Sets the reason why authentication of a client failed. | |
| void | test_acc_parse_client_messages (void **state) |
| void | test_parse_acc_parameters (void **state) |
| void | test_acc_common_protocols (void **state) |
| void | test_acc_send_message (void **state) |
| void | test_list_intersection (void **state) |
Variables | |
| char | control_channel_message_sent [2048] |
| #define MSG_PAYLOAD |
Definition at line 69 of file test_acc.c.
Referenced by test_acc_parse_client_messages().
| void auth_set_client_reason | ( | struct tls_multi * | multi, |
| const char * | client_reason ) |
Sets the reason why authentication of a client failed.
This be will send to the client when the AUTH_FAILED message is sent An example would be "SESSION: Token expired"
| multi | The multi tls struct |
| client_reason | The string to send to the client as part of AUTH_FAILED |
Definition at line 65 of file test_acc.c.
| bool send_control_channel_string_dowork | ( | struct tls_session * | session, |
| const char * | str, | ||
| unsigned int | msglevel ) |
Definition at line 50 of file test_acc.c.
References assert_int_in_range, and control_channel_message_sent.
| void send_push_reply_auth_token | ( | struct tls_multi * | multi | ) |
Sends a push reply message only containin the auth-token to update the auth-token on the client.
Always pushes to the active session
| multi | - The tls_multi structure belonging to the instance to push to |
Definition at line 60 of file test_acc.c.
| void test_acc_common_protocols | ( | void ** | state | ) |
Definition at line 236 of file test_acc.c.
References tls_multi::acc_max_message_length, ACC_MAX_MSG_LEN, tls_multi::acc_negotiated_protocols, options::acc_protocols, tls_options::acc_protocols, ALLOC_OBJ_CLEAR_GC, context::c2, multi_instance::context, determine_common_acc_protocols(), env_set_create(), env_set_get(), tls_options::es, options::gc, gc_free(), gc_new(), tls_multi::opt, tls_session::opt, context::options, tls_multi::peer_info, tls_multi::session, context_2::tls_multi, and TM_ACTIVE.
Referenced by main().
| void test_acc_parse_client_messages | ( | void ** | state | ) |
Definition at line 79 of file test_acc.c.
References tls_multi::acc_negotiated_protocols, ALLOC_OBJ_CLEAR_GC, buf_set_read(), context::c2, CLEAR, gc, gc_free(), gc_new(), context_2::mda_context, tls_options::mda_context, mock_managment_buf, mock_msg_buf, options::mode, MODE_SERVER, msg, MSG_PAYLOAD, tls_multi::opt, tls_session::opt, context::options, receive_acc_message(), tls_multi::session, context_2::tls_multi, TM_ACTIVE, and x_debug_level.
Referenced by main().
| void test_acc_send_message | ( | void ** | state | ) |
Definition at line 264 of file test_acc.c.
References tls_multi::acc_negotiated_protocols, options::acc_protocols, tls_options::acc_protocols, ALLOC_OBJ_CLEAR_GC, context::c2, multi_instance::context, control_channel_message_sent, determine_common_acc_protocols(), env_set_create(), tls_options::es, options::gc, gc_free(), gc_new(), tls_multi::opt, tls_session::opt, context::options, tls_multi::peer_info, send_acc_message(), tls_multi::session, context_2::tls_multi, and TM_ACTIVE.
Referenced by main().
| void test_list_intersection | ( | void ** | state | ) |
Definition at line 323 of file test_acc.c.
References buf_cstr(), buf_len(), gc, gc_free(), gc_new(), and get_list_intersection().
Referenced by main().
| void test_parse_acc_parameters | ( | void ** | state | ) |
Definition at line 175 of file test_acc.c.
References gc, gc_free(), gc_new(), and parse_acc_parameters().
Referenced by main().
| char control_channel_message_sent[2048] |
Definition at line 46 of file test_acc.c.
Referenced by send_control_channel_string_dowork(), and test_acc_send_message().