OpenVPN
|
#include "syshead.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <setjmp.h>
#include <cmocka.h>
#include "ssl_ncp.c"
#include "test_common.h"
Go to the source code of this file.
Functions | |
bool | key_state_export_keying_material (struct tls_session *session, const char *label, size_t label_size, void *ekm, size_t ekm_size) |
Keying Material Exporters [RFC 5705] allows additional keying material to be derived from existing TLS channel. More... | |
static void | test_check_ncp_ciphers_list (void **state) |
static void | test_extract_client_ciphers (void **state) |
static void | test_poor_man (void **state) |
static void | test_ncp_best (void **state) |
static void | test_ncp_default (void **state) |
static void | test_ncp_expand (void **state) |
int | main (void) |
Variables | |
const char * | bf_chacha = "BF-CBC:CHACHA20-POLY1305" |
const char * | aes_chacha = "AES-128-CBC:CHACHA20-POLY1305" |
const char * | aes_ciphers = "AES-256-GCM:AES-128-GCM" |
const struct CMUnitTest | ncp_tests [] |
bool key_state_export_keying_material | ( | struct tls_session * | session, |
const char * | label, | ||
size_t | label_size, | ||
void * | ekm, | ||
size_t | ekm_size | ||
) |
Keying Material Exporters [RFC 5705] allows additional keying material to be derived from existing TLS channel.
This exported keying material can then be used for a variety of purposes.
session | The session associated with the given key_state |
label | The label to use when exporting the key |
label_size | The size of the label to use when exporting the key |
ekm | Buffer to return the exported key material in |
ekm_size | The size of ekm, in bytes |
Definition at line 50 of file test_ncp.c.
References ASSERT.
int main | ( | void | ) |
Definition at line 407 of file test_ncp.c.
References ncp_tests, and openvpn_unit_test_setup().
|
static |
Definition at line 69 of file test_ncp.c.
References aes_chacha, aes_ciphers, bf_chacha, cipher_valid(), gc, gc_free(), gc_new(), and mutate_ncp_cipher_list().
|
static |
Definition at line 149 of file test_ncp.c.
References aes_ciphers, gc, gc_free(), gc_new(), tls_peer_ncp_list(), and tls_peer_supports_ncp().
|
static |
Definition at line 237 of file test_ncp.c.
References gc, gc_free(), gc_new(), and ncp_get_best_cipher().
|
static |
Definition at line 275 of file test_ncp.c.
References cipher_valid(), options::gc, gc_free(), gc_new(), options::ncp_ciphers, options::ncp_ciphers_conf, and options_postprocess_setdefault_ncpciphers().
|
static |
Definition at line 356 of file test_ncp.c.
References cipher_valid(), options::gc, gc, gc_free(), gc_new(), options::ncp_ciphers, ncp_expanded_ciphers(), and options_postprocess_setdefault_ncpciphers().
|
static |
Definition at line 188 of file test_ncp.c.
References gc, gc_free(), gc_new(), and ncp_get_best_cipher().
const char* aes_chacha = "AES-128-CBC:CHACHA20-POLY1305" |
Definition at line 43 of file test_ncp.c.
Referenced by test_check_ncp_ciphers_list().
const char* aes_ciphers = "AES-256-GCM:AES-128-GCM" |
Definition at line 44 of file test_ncp.c.
Referenced by test_check_ncp_ciphers_list(), and test_extract_client_ciphers().
const char* bf_chacha = "BF-CBC:CHACHA20-POLY1305" |
Definition at line 42 of file test_ncp.c.
Referenced by test_check_ncp_ciphers_list().
const struct CMUnitTest ncp_tests[] |
Definition at line 396 of file test_ncp.c.
Referenced by main().