Functions | Variables
test_ncp.c File Reference
#include "syshead.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <setjmp.h>
#include <cmocka.h>
#include "ssl_ncp.c"
Include dependency graph for test_ncp.c:

Go to the source code of this file.


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)
int main (void)


const char * bf_chacha = "BF-CBC:CHACHA20-POLY1305"
const char * aes_ciphers = "AES-256-GCM:AES-128-GCM"
const struct CMUnitTest ncp_tests []

Function Documentation

◆ main()

int main ( void  )

Definition at line 235 of file test_ncp.c.

References cmocka_run_group_tests.

◆ test_check_ncp_ciphers_list()

static void test_check_ncp_ciphers_list ( void **  state)

◆ test_extract_client_ciphers()

static void test_extract_client_ciphers ( void **  state)

◆ test_ncp_best()

static void test_ncp_best ( void **  state)

Definition at line 187 of file test_ncp.c.

References assert_string_equal, gc_free(), gc_new(), and ncp_get_best_cipher().

◆ test_poor_man()

static void test_poor_man ( void **  state)

Variable Documentation

◆ aes_ciphers

const char* aes_ciphers = "AES-256-GCM:AES-128-GCM"

Definition at line 45 of file test_ncp.c.

Referenced by test_check_ncp_ciphers_list(), and test_extract_client_ciphers().

◆ bf_chacha

const char* bf_chacha = "BF-CBC:CHACHA20-POLY1305"

Definition at line 44 of file test_ncp.c.

Referenced by test_check_ncp_ciphers_list().

◆ ncp_tests

const struct CMUnitTest ncp_tests[]
Initial value:
= {
#define cmocka_unit_test(f)
Initializes a CMUnitTest structure.
Definition: cmocka.h:1653
static void test_poor_man(void **state)
Definition: test_ncp.c:138
static void test_extract_client_ciphers(void **state)
Definition: test_ncp.c:99
static void test_check_ncp_ciphers_list(void **state)
Definition: test_ncp.c:48
static void test_ncp_best(void **state)
Definition: test_ncp.c:187

Definition at line 226 of file test_ncp.c.