OpenVPN
Functions | Variables
test_ssl.c File Reference
#include "syshead.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <setjmp.h>
#include <cmocka.h>
#include "crypto.h"
#include "options.h"
#include "ssl_backend.h"
#include "options_util.h"
#include "mock_msg.h"
#include "mss.h"
#include "ssl_verify_backend.h"
#include "win32.h"
#include "test_common.h"
Include dependency graph for test_ssl.c:

Go to the source code of this file.

Functions

const char * strerror_win32 (DWORD errnum, struct gc_arena *gc)
 
void throw_signal (const int signum)
 Throw a hard signal. More...
 
static const char * get_tmp_dir ()
 
static void crypto_pem_encode_certificate (void **state)
 
int main (void)
 

Variables

struct signal_info siginfo_static
 
const char * unittest_cert
 

Function Documentation

◆ crypto_pem_encode_certificate()

static void crypto_pem_encode_certificate ( void **  state)
static

◆ get_tmp_dir()

static const char* get_tmp_dir ( )
static

Definition at line 81 of file test_ssl.c.

References win_get_tempdir().

Referenced by crypto_pem_encode_certificate().

◆ main()

int main ( void  )

◆ strerror_win32()

const char* strerror_win32 ( DWORD  errnum,
struct gc_arena gc 
)

Definition at line 54 of file test_ssl.c.

References alloc_buf_gc(), ASSERT, BSTR, buf_printf(), SIZE, status, and utf16to8().

◆ throw_signal()

void throw_signal ( const int  signum)

Throw a hard signal.

Called from management and when windows signals are received through ctrl-c, exit event etc.

Definition at line 60 of file test_ssl.c.

References ASSERT, block_async_signals(), D_SIGNAL_DEBUG, ignored_hard_signals_mask, msg, SIG_SOURCE_HARD, siginfo_static, signal_name(), signal_info::signal_received, try_throw_signal(), and unblock_async_signals().

Variable Documentation

◆ siginfo_static

struct signal_info siginfo_static

Definition at line 51 of file test_ssl.c.

Referenced by get_signal().

◆ unittest_cert

const char* unittest_cert
Initial value:
= "-----BEGIN CERTIFICATE-----\n"
"MIIBuTCCAUCgAwIBAgIUTLtjSBzx53qZRvZ6Ur7D9kgoOHkwCgYIKoZIzj0EAwIw\n"
"EzERMA8GA1UEAwwIdW5pdHRlc3QwIBcNMjMxMTIxMDk1NDQ3WhgPMjA3ODA4MjQw\n"
"OTU0NDdaMBMxETAPBgNVBAMMCHVuaXR0ZXN0MHYwEAYHKoZIzj0CAQYFK4EEACID\n"
"YgAEHYB2hn2xx3f4lClXDtdi36P19pMZA+kI1Dkv/Vn10vBZ/j9oa+P99T8duz/e\n"
"QlPeHpesNJO4fX8iEDj6+vMeWejOT7jAQ4MmG5EZjpcBKxCfwFooEvzu8bVujUcu\n"
"wTQEo1MwUTAdBgNVHQ4EFgQUPcgBEVXjF5vYfDsInoE3dF6UfQswHwYDVR0jBBgw\n"
"FoAUPcgBEVXjF5vYfDsInoE3dF6UfQswDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjO\n"
"PQQDAgNnADBkAjBLPAGrQAyinigqiu0RomoV8TVaknVLFSq6H6A8jgvzfsFCUK1O\n"
"dvNZhFPM6idKB+oCME2JLOBANCSV8o7aJzq7SYHKwPyb1J4JFlwKe/0Jpv7oh9b1\n"
"IJbuaM9Z/VSKbrIXGg==\n"
"-----END CERTIFICATE-----\n"

Definition at line 67 of file test_ssl.c.

Referenced by crypto_pem_encode_certificate().