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 "crypto_epoch.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 "ssl.h"
#include "buffer.h"
#include "packet_id.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.
 
bool get_user_pass_cr (struct user_pass *up, const char *auth_file, const char *prefix, const unsigned int flags, const char *auth_challenge)
 Retrieves the user credentials from various sources depending on the flags.
 
void purge_user_pass (struct user_pass *up, bool force)
 
static const char * get_tmp_dir (void)
 
static int init (void **state)
 
static int cleanup (void **state)
 
static void crypto_pem_encode_certificate (void **state)
 
static void test_load_certificate_and_key (void **state)
 
static void test_load_certificate_and_key_uri (void **state)
 
static void init_frame_parameters (struct frame *frame)
 
static void do_data_channel_round_trip (struct crypto_options *co)
 
static void encrypt_one_packet (struct crypto_options *co, int len)
 
static void check_aead_limits (struct crypto_options *co, bool chachapoly)
 
static struct crypto_options init_crypto_options (const char *cipher, const char *auth, bool epoch, struct key2 *statickey)
 
static void uninit_crypto_options (struct crypto_options *co)
 
static void run_data_channel_with_cipher_epoch (const char *cipher)
 
static void run_data_channel_with_cipher (const char *cipher, const char *auth)
 
static void test_data_channel_roundtrip_aes_128_gcm (void **state)
 
static void test_data_channel_roundtrip_aes_128_gcm_epoch (void **state)
 
static void test_data_channel_roundtrip_aes_192_gcm (void **state)
 
static void test_data_channel_roundtrip_aes_192_gcm_epoch (void **state)
 
static void test_data_channel_roundtrip_aes_256_gcm (void **state)
 
static void test_data_channel_roundtrip_aes_256_gcm_epoch (void **state)
 
static void test_data_channel_roundtrip_aes_128_cbc (void **state)
 
static void test_data_channel_roundtrip_aes_192_cbc (void **state)
 
static void test_data_channel_roundtrip_aes_256_cbc (void **state)
 
static void test_data_channel_roundtrip_chacha20_poly1305 (void **state)
 
static void test_data_channel_roundtrip_chacha20_poly1305_epoch (void **state)
 
static void test_data_channel_roundtrip_bf_cbc (void **state)
 
static struct key2 create_key (void)
 
static void test_data_channel_known_vectors_run (bool epoch)
 
static void test_data_channel_known_vectors_epoch (void **state)
 
static void test_data_channel_known_vectors_shortpktid (void **state)
 
int main (void)
 

Variables

struct signal_info siginfo_static
 
static const char *const unittest_cert
 
static const char *const unittest_key
 
struct { 
 
   struct gc_arena   gc 
 
   const char *   certfile 
 
   const char *   keyfile 
 
global_state 
 

Function Documentation

◆ check_aead_limits()

static void check_aead_limits ( struct crypto_options co,
bool  chachapoly 
)
static

◆ cleanup()

static int cleanup ( void **  state)
static

Definition at line 182 of file test_ssl.c.

References gc_free(), and global_state.

Referenced by main().

◆ create_key()

static struct key2 create_key ( void  )
static

Definition at line 635 of file test_ssl.c.

References ASSERT, key::cipher, key::hmac, key2, key2::keys, and key2::n.

Referenced by test_data_channel_known_vectors_run().

◆ crypto_pem_encode_certificate()

static void crypto_pem_encode_certificate ( void **  state)
static

◆ do_data_channel_round_trip()

static void do_data_channel_round_trip ( struct crypto_options co)
static

◆ encrypt_one_packet()

static void encrypt_one_packet ( struct crypto_options co,
int  len 
)
static

◆ get_tmp_dir()

static const char * get_tmp_dir ( void  )
static

Definition at line 141 of file test_ssl.c.

References win_get_tempdir().

Referenced by crypto_pem_encode_certificate(), and init().

◆ get_user_pass_cr()

bool get_user_pass_cr ( struct user_pass up,
const char *  auth_file,
const char *  prefix,
const unsigned int  flags,
const char *  auth_challenge 
)

Retrieves the user credentials from various sources depending on the flags.

Parameters
upThe user_pass structure to store the retrieved credentials.
auth_fileThe path to the authentication file. Might be NULL.
prefixThe prefix to prepend to user prompts.
flagsAdditional flags to control the behavior of the function.
auth_challengeThe authentication challenge string.
Returns
true if the user credentials were successfully retrieved, false otherwise.

Definition at line 76 of file test_ssl.c.

Referenced by get_user_pass().

◆ init()

static int init ( void **  state)
static

Definition at line 161 of file test_ssl.c.

References gc_new(), get_tmp_dir(), global_state, platform_create_temp_file(), unittest_cert, unittest_key, and write.

Referenced by main().

◆ init_crypto_options()

static struct crypto_options init_crypto_options ( const char *  cipher,
const char *  auth,
bool  epoch,
struct key2 statickey 
)
static

◆ init_frame_parameters()

static void init_frame_parameters ( struct frame frame)
static

◆ main()

int main ( void  )

◆ purge_user_pass()

void purge_user_pass ( struct user_pass up,
bool  force 
)

Definition at line 82 of file test_ssl.c.

◆ run_data_channel_with_cipher()

static void run_data_channel_with_cipher ( const char *  cipher,
const char *  auth 
)
static

◆ run_data_channel_with_cipher_epoch()

static void run_data_channel_with_cipher_epoch ( const char *  cipher)
static

◆ strerror_win32()

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

Definition at line 58 of file test_ssl.c.

References ASSERT.

◆ test_data_channel_known_vectors_epoch()

static void test_data_channel_known_vectors_epoch ( void **  state)
static

Definition at line 770 of file test_ssl.c.

References test_data_channel_known_vectors_run().

Referenced by main().

◆ test_data_channel_known_vectors_run()

static void test_data_channel_known_vectors_run ( bool  epoch)
static

◆ test_data_channel_known_vectors_shortpktid()

static void test_data_channel_known_vectors_shortpktid ( void **  state)
static

Definition at line 776 of file test_ssl.c.

References test_data_channel_known_vectors_run().

Referenced by main().

◆ test_data_channel_roundtrip_aes_128_cbc()

static void test_data_channel_roundtrip_aes_128_cbc ( void **  state)
static

Definition at line 581 of file test_ssl.c.

References run_data_channel_with_cipher().

Referenced by main().

◆ test_data_channel_roundtrip_aes_128_gcm()

static void test_data_channel_roundtrip_aes_128_gcm ( void **  state)
static

Definition at line 545 of file test_ssl.c.

References run_data_channel_with_cipher().

Referenced by main().

◆ test_data_channel_roundtrip_aes_128_gcm_epoch()

static void test_data_channel_roundtrip_aes_128_gcm_epoch ( void **  state)
static

Definition at line 551 of file test_ssl.c.

References run_data_channel_with_cipher_epoch().

Referenced by main().

◆ test_data_channel_roundtrip_aes_192_cbc()

static void test_data_channel_roundtrip_aes_192_cbc ( void **  state)
static

Definition at line 587 of file test_ssl.c.

References run_data_channel_with_cipher().

Referenced by main().

◆ test_data_channel_roundtrip_aes_192_gcm()

static void test_data_channel_roundtrip_aes_192_gcm ( void **  state)
static

Definition at line 557 of file test_ssl.c.

References run_data_channel_with_cipher().

Referenced by main().

◆ test_data_channel_roundtrip_aes_192_gcm_epoch()

static void test_data_channel_roundtrip_aes_192_gcm_epoch ( void **  state)
static

Definition at line 563 of file test_ssl.c.

References run_data_channel_with_cipher_epoch().

Referenced by main().

◆ test_data_channel_roundtrip_aes_256_cbc()

static void test_data_channel_roundtrip_aes_256_cbc ( void **  state)
static

Definition at line 593 of file test_ssl.c.

References run_data_channel_with_cipher().

Referenced by main().

◆ test_data_channel_roundtrip_aes_256_gcm()

static void test_data_channel_roundtrip_aes_256_gcm ( void **  state)
static

Definition at line 569 of file test_ssl.c.

References run_data_channel_with_cipher().

Referenced by main().

◆ test_data_channel_roundtrip_aes_256_gcm_epoch()

static void test_data_channel_roundtrip_aes_256_gcm_epoch ( void **  state)
static

Definition at line 575 of file test_ssl.c.

References run_data_channel_with_cipher_epoch().

Referenced by main().

◆ test_data_channel_roundtrip_bf_cbc()

static void test_data_channel_roundtrip_bf_cbc ( void **  state)
static

Definition at line 623 of file test_ssl.c.

References cipher_valid(), and run_data_channel_with_cipher().

Referenced by main().

◆ test_data_channel_roundtrip_chacha20_poly1305()

static void test_data_channel_roundtrip_chacha20_poly1305 ( void **  state)
static

Definition at line 599 of file test_ssl.c.

References cipher_valid(), and run_data_channel_with_cipher().

Referenced by main().

◆ test_data_channel_roundtrip_chacha20_poly1305_epoch()

static void test_data_channel_roundtrip_chacha20_poly1305_epoch ( void **  state)
static

Definition at line 611 of file test_ssl.c.

References cipher_valid(), and run_data_channel_with_cipher_epoch().

Referenced by main().

◆ test_load_certificate_and_key()

static void test_load_certificate_and_key ( void **  state)
static

◆ test_load_certificate_and_key_uri()

static void test_load_certificate_and_key_uri ( void **  state)
static

◆ 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 64 of file test_ssl.c.

References ASSERT.

◆ uninit_crypto_options()

static void uninit_crypto_options ( struct crypto_options co)
static

Variable Documentation

◆ certfile

const char* certfile

Definition at line 156 of file test_ssl.c.

Referenced by test_load_certificate_and_key_uri().

◆ gc

struct gc_arena gc

Definition at line 155 of file test_ssl.c.

Referenced by __wrap_buffer_read_from_file(), adapter_index_of_ip(), add_env_item(), add_option(), add_route(), add_route_ipapi(), add_route_ipv6(), alloc_buf_gc(), alloc_local_entry(), alloc_local_list_if_undef(), argv_msg(), argv_msg_prefix(), argv_prep_format(), argv_str(), argv_str__empty_argv__empty_output(), argv_str__multiple_argv__correct_output(), backend_x509_get_serial(), backend_x509_get_serial_hex(), backend_x509_get_username(), buffer_read_from_file(), ccs_gen_config_file(), ccs_gen_deferred_ret_file(), ce_management_query_proxy(), ce_management_query_remote(), check_addr_clash(), check_auth_pending_method(), check_file_access_chroot(), check_for_client_reason(), check_incoming_control_channel(), check_inline_file(), check_inline_file_via_buf(), check_inline_file_via_fp(), check_session_cipher(), check_stale_routes(), clone_client_nat_option_list(), clone_dns_domains(), clone_dns_options(), clone_dns_servers(), close_tun(), connection_entry_preload_key(), construct_name_value(), crypto_check_replay(), crypto_pem_encode(), crypto_pem_encode_certificate(), crypto_pem_encode_decode_loopback(), dco_version_string(), dco_win_add_iroute_ipv4(), dco_win_add_iroute_ipv6(), dco_win_del_iroute_ipv4(), dco_win_del_iroute_ipv6(), del_route_ipapi(), delete_route(), delete_route_ipv6(), delete_temp_addresses(), dhcp_extract_router_msg(), dhcp_masq_addr(), dhcp_release_by_adapter_index(), dhcp_renew_by_adapter_index(), dhcp_status(), dns_domain_list_append(), dns_server_get(), do_address_service(), do_close_tun(), do_compute_occ_strings(), do_data_channel_round_trip(), do_dns_domain_service(), do_dns_service(), do_ifconfig_ipv4(), do_ifconfig_ipv6(), do_ifconfig_setenv(), do_open_tun(), do_pre_decrypt_check(), do_route_service(), do_set_mtu_service(), do_wins_service(), drop_if_recursive_routing(), ecdsa_sign_sig(), encrypt_one_packet(), env_set_create(), establish_http_proxy_passthru(), export_user_keying_material(), extract_command_buffer(), extract_var_peer_info(), fork_dhcp_action(), fork_register_dns_action(), format_common_name(), format_hex(), format_hex_ex(), format_ip_addr_string(), format_route_entry(), frame_print(), free_buf_gc(), generate_auth_token(), generate_key_random(), generate_prefix(), get_adapter_index_method_2(), get_adapter_info(), get_adapter_info_list(), get_best_route(), get_bypass_addresses(), get_default_gateway(), get_default_gateway_ipv6(), get_default_gateway_row(), get_device_guid(), get_device_instance_id_interface(), get_interface_info(), get_interface_info_list(), get_ipv6_addr_no_netbits(), get_p2p_ncp_cipher(), get_pa_var(), get_panel_reg(), get_per_adapter_info(), get_tap_reg(), get_unspecified_device_guid(), get_user_pass_cr(), get_windows_routing_table(), guess_tuntap_dev(), handle_data_channel_packet(), helper_client_server(), hostname_randomize(), ifconfig_options_string(), ifconfig_pool_init(), ifconfig_pool_list(), ifconfig_pool_read(), ifconfig_pool_verify_range(), ifconfig_sanity_check(), incoming_push_message(), init_http_proxy_options_once(), init_key_ctx(), init_route_ipv6_list(), init_route_list(), init_ssl(), init_static(), ip_addr_string_to_array(), ipchange_fmt(), ipset2ascii_all(), key_method_2_read(), key_print(), key_source_print(), key_state_check_auth_failed_message_file(), key_state_gen_auth_control_files(), learn_address_script(), link_socket_bad_incoming_addr(), link_socket_connection_initiated(), linksock_print_addr(), log_entry_print(), make_arg_array(), make_arg_copy(), make_base64_string(), make_base64_string2(), make_env_array(), make_extended_arg_array(), make_inline_array(), man_connect(), man_dispatch_command(), man_history(), man_io_error(), man_kill(), man_listen(), man_new_connection_post(), man_output_extra_env(), man_process_command(), management_callback_proxy_cmd(), management_callback_send_cc_message(), management_echo(), management_hold(), management_learn_addr(), management_notify_client_cr_response(), management_query_multiline(), management_query_user_pass(), management_set_state(), mroute_addr_print(), mroute_addr_print_ex(), mroute_extract_addr_ip(), mroute_helper_regenerate(), mroute_learnable_address(), msg_flags_string(), multi_add_iroutes(), multi_client_connect_call_script(), multi_client_connect_late_setup(), multi_client_connect_setenv(), multi_client_set_protocol_options(), multi_client_setup_dco_initial(), multi_create_instance(), multi_create_instance_tcp(), multi_get_create_instance_udp(), multi_get_instance_by_virtual_addr(), multi_instance_string(), multi_io_post(), multi_learn_addr(), multi_print_status(), multi_process_float(), multi_process_incoming_link(), multi_reap_range(), multi_select_virtual_addr(), mutate_ncp_cipher_list(), ncp_expanded_ciphers(), ncp_get_best_cipher(), netsh_delete_address_dns(), netsh_get_id(), netsh_ifconfig(), netsh_ifconfig_options(), netsh_set_dns6_servers(), new_client_nat_list(), ntlm_phase_1(), ntlm_phase_3(), open_tun(), open_tun_afunix(), openvpn_decrypt_aead(), openvpn_decrypt_v1(), openvpn_encrypt_aead(), openvpn_encrypt_v1(), openvpn_execve(), openvpn_execve_check(), openvpn_getaddrinfo(), openvpn_popen(), openvpn_strerror(), options_cmp_equal_safe(), options_string(), options_string_compat_lzo(), options_string_extract_option(), options_string_version(), options_warning_extract_parm1(), options_warning_safe_ml(), options_warning_safe_scan1(), options_warning_safe_scan2(), ovpn_dco_init_mp(), ovpn_expand_label(), p2p_mode_ncp(), packet_id_net_print(), packet_id_persist_load(), packet_id_persist_print(), packet_id_persist_save(), parse_auth_challenge(), parse_auth_failed_temp(), parse_hash_fingerprint(), parse_hash_fingerprint_multiline(), parse_http_proxy_override(), parse_line(), platform_access(), platform_chdir(), platform_create_temp_file(), platform_fopen(), platform_gen_path(), platform_open(), platform_stat(), platform_unlink(), plugin_call_item(), plugin_call_ssl(), plugin_common_open(), plugin_init_item(), plugin_mask_string(), plugin_open_item(), plugin_option_list_add(), plugin_option_list_new(), plugin_option_list_print(), plugin_vlog(), pre_connect_restore(), prepare_auth_token_push_reply(), prepare_push_reply(), prepend_dir(), print_argv(), print_client_nat_list(), print_default_gateway(), print_in6_addr(), print_in_addr_t(), print_in_port_t(), print_key_id(), print_key_id_not_found_reason(), print_link_socket_actual(), print_link_socket_actual_ex(), print_netmask(), print_openvpn_sockaddr(), print_opt_route(), print_opt_route_gateway(), print_opt_route_gateway_dhcp(), print_opt_topology(), print_pkt(), print_route(), print_sockaddr(), print_sockaddr_ex(), print_status(), print_str(), print_str_int(), process_incoming_link_part1(), process_incoming_push_request(), process_incoming_tun(), process_outgoing_link(), proto2ascii_all(), protocol_dump(), push_option_ex(), push_option_fmt(), push_options(), push_peer_info(), read_control_auth(), read_inline_file(), read_key_file(), read_pem_key_file(), recv_socks_reply(), redirect_stdout_stderr(), register_dns_service(), reliable_ack_print(), reliable_ack_read(), reliable_can_get(), reliable_can_send(), reliable_get_buf_output_sequenced(), reliable_get_num_output_sequenced_available(), reliable_not_replay(), reliable_send_timeout(), reliable_wont_break_sequentiality(), remove_iroutes_from_push_route_list(), resolve_bind_local(), resolve_remote(), route_ipv6_ipapi(), route_quota_exceeded(), route_string(), run_up_down(), safe_print(), sanitize_control_message(), send_auth_failed(), send_auth_pending_messages(), send_control_channel_string_dowork(), send_msg_iservice(), send_push_reply(), send_push_reply_auth_token(), server_pushed_info(), service_enable_dhcp(), service_register_ring_buffers(), session_id_print(), session_move_pre_start(), setenv_dns_options(), setenv_format_indexed_name(), setenv_int_i(), setenv_route(), setenv_route_addr(), setenv_route_ipv6(), setenv_str_ex(), setenv_str_i(), show_adapter(), show_adapters(), show_dco_version(), show_dhcp_option_addrs(), show_dns_options(), show_p2mp_parms(), show_routes(), show_settings(), show_tap_win_adapters(), show_windows_version(), socket_bind(), socket_connect(), socket_do_listen(), socket_listen_accept(), socket_recv_queue(), socket_send_queue(), socket_stat(), strerror_win32(), string_alloc(), string_alloc_buf(), string_mod_const(), string_substitute(), system_error_message(), tap_allow_nonadmin_access(), tap_win_getinfo(), tcp_connection_established(), test_buffer_chomp(), test_buffer_format_hex_ex(), test_buffer_free_gc_one(), test_buffer_free_gc_two(), test_buffer_gc_realloc(), test_buffer_printf_catrunc(), test_character_string_mod_buf(), test_check_ncp_ciphers_list(), test_cipher_names(), test_compat_lzo_string(), test_crypto(), test_data_channel_known_vectors_run(), test_extract_client_ciphers(), test_extract_control_message(), test_list(), test_load_certificate_and_key_uri(), test_local_addr(), test_mssfix_mtu_calculation(), test_ncp_best(), test_ncp_expand(), test_occ_mtu_calculation(), test_poor_man(), test_routes(), test_tls_crypt_secure_reneg_key(), time_string(), tls_auth_standalone_init(), tls_authentication_status(), tls_crypt_unwrap(), tls_crypt_v2_unwrap_client_key(), tls_crypt_v2_verify_metadata(), tls_crypt_v2_wrap_client_key(), tls_crypt_v2_write_client_key_file(), tls_crypt_wrap(), tls_ctx_set_tls_groups(), tls_multi_process(), tls_peer_ncp_list(), tls_pre_decrypt(), tls_pre_decrypt_lite(), tls_pre_encrypt(), tls_session_init(), tls_update_remote_addr(), trigger_ping_timeout_signal(), tun_open_device(), tun_read_queue(), tun_stat(), tun_write_queue(), tuntap_dhcp_mask(), tuntap_set_ip_addr(), tuntap_set_ptp(), tv_string(), tv_string_abs(), undo_ifconfig_ipv4(), undo_ifconfig_ipv6(), username_password_as_base64(), utf16to8(), verify_255_255_255_252(), verify_callback(), verify_cert(), verify_cert_call_command(), verify_cert_set_env(), verify_check_crl_dir(), verify_common_subnet(), verify_crresponse_script(), verify_final_auth_checks(), verify_user_pass_script(), virtual_output_callback_func(), warn_on_use_of_common_subnets(), wide_cmd_line(), wide_string(), win32_signal_open(), win32_version_string(), win_wfp_block_service(), win_wfp_msg_handler(), window_title_generate(), windows_route_find_if_index(), windows_set_mtu(), write_key_file(), write_outgoing_tls_ciphertext(), write_pem_key_file(), x509_get_sha1_fingerprint(), x509_get_sha256_fingerprint(), x509_get_subject(), x509_setenv_track(), x509_track_add(), x_check_status(), and x_msg_va().

◆ [struct]

struct { ... } global_state

◆ keyfile

const char* keyfile

Definition at line 157 of file test_ssl.c.

Referenced by test_load_certificate_and_key_uri().

◆ siginfo_static

struct signal_info siginfo_static

Definition at line 55 of file test_ssl.c.

Referenced by get_signal().

◆ unittest_cert

const char* const unittest_cert
static
Initial value:
=
"-----BEGIN CERTIFICATE-----\n"
"MIIDYzCCAkugAwIBAgIRALrXTx4lqa8QgF7uGjISxmcwDQYJKoZIhvcNAQELBQAw\n"
"GDEWMBQGA1UEAwwNT1ZQTiBURVNUIENBMTAgFw0yMzAzMTMxNjA5MThaGA8yMTIz\n"
"MDIxNzE2MDkxOFowGTEXMBUGA1UEAwwOb3Zwbi10ZXN0LXJzYTEwggEiMA0GCSqG\n"
"SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7xFoR6fmoyfsJIQDKKgbYgFw0MzVuDAmp\n"
"Rx6KTEihgTchkQx9fHddWbKiOUbcEnQi3LNux7P4QVl/4dRR3skisBug6Vd5LXeB\n"
"GZqmpu5XZiF4DgLz1lX21G0aOogFWkie2qGEcso40159x9FBDl5A3sLP18ubeex0\n"
"pd/BzDFv6SLOTyVWO/GCNc8IX/i0uN4mLvoVU00SeqwTPnS+CRXrSq4JjGDJLsXl\n"
"0/PlxkjsgU0yOOA0Z2d8Fzk3wClwP6Hc49BOMWKstUIhLbG2DcIv8l29EuEj2w3j\n"
"u/7gkewol96XQ2twpPvpoVAaiVh/m7hQUcQORQCD6eJcDjOZVCArAgMBAAGjgaQw\n"
"gaEwCQYDVR0TBAIwADAdBgNVHQ4EFgQUqYnRaBHrZmKLtMZES5AuwqzJkGYwUwYD\n"
"VR0jBEwwSoAU3MLDNDOK13DqflQ8ra7FeGBXK06hHKQaMBgxFjAUBgNVBAMMDU9W\n"
"UE4gVEVTVCBDQTGCFD55ErHXpK2JXS3WkfBm0NB1r3vKMBMGA1UdJQQMMAoGCCsG\n"
"AQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0BAQsFAAOCAQEAZVcXrezA9Aby\n"
"sfUNHAsMxrex/EO0PrIPSrmSmc9sCiD8cCIeB6kL8c5iPPigoWW0uLA9zteDRFes\n"
"ez+Z8wBY6g8VQ0tFPURDooUg5011GZPDcuw7/PsI4+I2J9q6LHEp+6Oo4faSn/kl\n"
"yWYCLjM4FZdGXbOijDacQJiN6HcRv0UdodBrEVRf7YHJJmMCbCI7ZUGW2zef/+rO\n"
"e4Lkxh0MLYqCkNKH5ZfoGTC4Oeb0xKykswAanqgR60r+upaLU8PFuI2L9M3vc6KU\n"
"F6MgVGSxl6eylJgDYckvJiAbmcp2PD/LRQQOxQA0yqeAMg2cbdvclETuYD6zoFfu\n"
"Y8aO7dvDlw==\n"
"-----END CERTIFICATE-----\n"

Definition at line 87 of file test_ssl.c.

Referenced by crypto_pem_encode_certificate(), init(), and test_load_certificate_and_key().

◆ unittest_key

const char* const unittest_key
static
Initial value:
=
"-----BEGIN PRIVATE KEY-----\n"
"MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC7xFoR6fmoyfsJ\n"
"IQDKKgbYgFw0MzVuDAmpRx6KTEihgTchkQx9fHddWbKiOUbcEnQi3LNux7P4QVl/\n"
"4dRR3skisBug6Vd5LXeBGZqmpu5XZiF4DgLz1lX21G0aOogFWkie2qGEcso40159\n"
"x9FBDl5A3sLP18ubeex0pd/BzDFv6SLOTyVWO/GCNc8IX/i0uN4mLvoVU00SeqwT\n"
"PnS+CRXrSq4JjGDJLsXl0/PlxkjsgU0yOOA0Z2d8Fzk3wClwP6Hc49BOMWKstUIh\n"
"LbG2DcIv8l29EuEj2w3ju/7gkewol96XQ2twpPvpoVAaiVh/m7hQUcQORQCD6eJc\n"
"DjOZVCArAgMBAAECggEACqkuWAAJ3cyCBVWrXs8eDmLTWV9i9DmYvtS75ixIn2rf\n"
"v3cl12YevN0f6FgKLuqZT3Vqdqq+DCVhuIIQ9QkKMH8BQpSdE9NCCsFyZ23o8Gtr\n"
"EQ7ymfecb+RFwYx7NpqWrvZI32VJGArgPZH/zorLTTGYrAZbmBtHEqRsXOuEDw97\n"
"slwwcWaa9ztaYC8/N/7fgsnydaCFSaOByRlWuyvSmHvn6ZwLv8ANOshY6fstC0Jb\n"
"BW0GpSe9eZPjpl71VT2RtpghqLV5+iAoFDHoT+eZvBospcUGtfcZSU7RrBjKB8+a\n"
"U1d6hwKhduVs2peIQzl+FiOSdWriLcsZv79q4sBhsQKBgQDUDVTf5BGJ8apOs/17\n"
"YVk+Ad8Ey8sXvsfk49psmlCRa8Z4g0LVXfrP94qzhtl8U5kE9hs3nEF4j/kX1ZWG\n"
"k11tdsNTZN5x5bbAgEgPA6Ap6J/uto0HS8G0vSv0lyBymdKA3p/i5Dx+8Nc9cGns\n"
"LGI9MvviLX7pQFIkvbaCkdKwYwKBgQDirowjWZnm7BgVhF0G1m3DY9nQTYYU185W\n"
"UESaO5/nVzwUrA+FypJamD+AvmlSuY8rJeQAGAS6nQr9G8/617r+GwJnzRtxC6Vl\n"
"4OF5BJRsD70oX4CFOOlycMoJ8tzcYVH7NI8KVocjxb+QW82hqSvEwSsvnwwn3eOW\n"
"nr5u5vIHmQKBgCuc3lL6Dl1ntdZgEIdau0cUjXDoFUo589TwxBDIID/4gaZxoMJP\n"
"hPFXAVDxMDPw4azyjSB/47tPKTUsuYcnMfT8kynIujOEwnSPLcLgxQU5kgM/ynuw\n"
"qhNpQOwaVRMc7f2RTCMXPBYDpNE/GJn5eu8JWGLpZovEreBeoHX0VffvAoGAVrWn\n"
"+3mxykhzaf+oyg3KDNysG+cbq+tlDVVE+K5oG0kePVYX1fjIBQmJ+QhdJ3y9jCbB\n"
"UVveqzeZVXqHEw/kgoD4aZZmsdZfnVnpRa5/y9o1ZDUr50n+2nzUe/u/ijlb77iK\n"
"Is04gnGJNoI3ZWhdyrSNfXjcYH+bKClu9OM4n7kCgYAorc3PAX7M0bsQrrqYxUS8\n"
"56UU0YdhAgYitjM7Fm/0iIm0vDpSevxL9js4HnnsSMVR77spCBAGOCCZrTcI3Ejg\n"
"xKDYzh1xlfMRjJBuBu5Pd55ZAv9NXFGpsX5SO8fDZQJMwpcbQH36+UdqRRFDpjJ0\n"
"ZbX6nKcJ7jciJVKJds59Jg==\n"
"-----END PRIVATE KEY-----\n"

Definition at line 110 of file test_ssl.c.

Referenced by init(), and test_load_certificate_and_key().