|
iPXE
|
TLS data format tests. More...
#include <string.h>#include <byteswap.h>#include <ipxe/tls.h>#include <ipxe/tlsfmt.h>#include <ipxe/test.h>Go to the source code of this file.
Data Structures | |
| union | tlsfmt_test_data |
| Space for test data. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static void | tlsfmt_test_exec (void) |
| Perform TLS data format self-test. | |
Variables | |
| static uint8_t | tls13_server_hello [] |
| Known valid TLSv1.3 ServerHello (from RFC 8448). | |
| static uint8_t | tls13_server_hello_random [] |
| TLSv1.3 ServerHello random bytes. | |
| static uint8_t | tls13_server_hello_public [] |
| TLSv1.3 ServerHello public key. | |
| static uint8_t | tls13_certificate [] |
| Known valid TLSv1.3 Certificate (from RFC 8448). | |
| static uint8_t | tls12_certificate [] |
| TLSv1.2 Certificate (derived from RFC 8448). | |
| static uint8_t | tls11_server_hello [] |
| TLSv1.1 ServerHello with no extensions. | |
| static uint8_t | tls12_server_key_exchange_ecdhe [] |
| TLSv1.2 ServerKeyExchange with explicit signature hash algorithm. | |
| static uint8_t | tls11_server_key_exchange_ecdhe [] |
| TLSv1.1 ServerKeyExchange with implicit signature hash algorithm. | |
| static uint8_t | server_key_exchange_point [] |
| ServerKeyExchange public curve point. | |
| static uint8_t | server_key_exchange_sig [] |
| ServerKeyExchange signature. | |
| struct self_test tlsfmt_test | __self_test |
| TLS data format self-test. | |
TLS data format tests.
Definition in file tlsfmt_test.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Perform TLS data format self-test.
Definition at line 277 of file tlsfmt_test.c.
References __attribute__, tls_server_hello::a, tls_server_hello::all, asn1_compare(), tls_server_hello::b, tls_certificate_entry::cert, tls_server_hello::cipher_suite, tls_server_key_exchange_ecdhe::curve, tls_cursor::data, DBGC, DBGC_HDA, tls_server_key_exchange_ecdhe::dsig, tls_server_hello::ems, tls_server_hello::ext, group, tls_key_share_entry::group, tls_server_key_exchange_ecdhe::group, htons, tls_server_hello::key, tls_cursor::len, tls_certificate::list, memcmp(), memcpy(), memset(), tls_certificate_entry::next, tls_key_share_entry::next, NULL, offset, ok, tls_server_key_exchange_ecdhe::point, tls_key_share_entry::public, tls_server_hello::random, x509_certificate::raw, tls_server_hello::reneg, tls_supported_version::selected, server_key_exchange_point, server_key_exchange_sig, tls_server_hello::session_id, tls_digitally_signed::sig, tls_digitally_signed::sig_hash, tls_server_hello::supver, tls11_server_hello, tls11_server_key_exchange_ecdhe, tls12_certificate, tls12_server_key_exchange_ecdhe, tls13_certificate, tls13_server_hello, tls13_server_hello_public, tls13_server_hello_random, TLS_AES_128_GCM_SHA256, tls_asn1(), tls_build, TLS_KEY_SHARE, TLS_NAMED_CURVE_TYPE, TLS_NAMED_GROUP_X25519, tls_parse, TLS_RENEGOTIATION_INFO, TLS_RSA_SHA1_ALGORITHM, tls_size, TLS_SUPPORTED_VERSIONS, TLS_VERSION_TLS_1_1, TLS_VERSION_TLS_1_2, TLS_VERSION_TLS_1_3, tls_server_key_exchange_ecdhe::type, u, tls_server_hello::version, and x509_put().
|
static |
Known valid TLSv1.3 ServerHello (from RFC 8448).
Definition at line 42 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
TLSv1.3 ServerHello random bytes.
Definition at line 54 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
TLSv1.3 ServerHello public key.
Definition at line 61 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
Known valid TLSv1.3 Certificate (from RFC 8448).
Definition at line 68 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
TLSv1.2 Certificate (derived from RFC 8448).
Definition at line 113 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
TLSv1.1 ServerHello with no extensions.
Definition at line 157 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
TLSv1.2 ServerKeyExchange with explicit signature hash algorithm.
Definition at line 165 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
TLSv1.1 ServerKeyExchange with implicit signature hash algorithm.
Definition at line 196 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
ServerKeyExchange public curve point.
Definition at line 227 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
|
static |
ServerKeyExchange signature.
Definition at line 234 of file tlsfmt_test.c.
Referenced by tlsfmt_test_exec().
| struct self_test tlsfmt_test __self_test |
TLS data format self-test.
Definition at line 617 of file tlsfmt_test.c.