H A D | ktls_test.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 46 #include <atf-c.h> 59 if (sysctlbyname("kern.ipc.tls.enable", &enable, &len, NULL, 0) == -1) { in require_ktls() 79 if (getsockopt(s, IPPROTO_TCP, sockopt, &mode, &len) == -1) in check_tls_mode() 91 if (getsockopt(s, IPPROTO_TCP, sockopt, &mode, &len) == -1) in check_tls_mode() 127 return (0x20 + random() % (0x7f - in rdigit() 546 build_tls_enable(const atf_tc_t * tc,int cipher_alg,size_t cipher_key_len,int auth_alg,int minor,uint64_t seqno,struct tls_enable * en) build_tls_enable() argument 606 free_tls_enable(struct tls_enable * en) free_tls_enable() argument 614 tls_EVP_CIPHER(const struct tls_enable * en) tls_EVP_CIPHER() argument 645 tls_EVP_MD(const struct tls_enable * en) tls_EVP_MD() argument 660 tls_header_len(struct tls_enable * en) tls_header_len() argument 682 tls_mac_len(struct tls_enable * en) tls_mac_len() argument 707 tls_trailer_len(struct tls_enable * en) tls_trailer_len() argument 721 tls_minimum_record_payload(struct tls_enable * en) tls_minimum_record_payload() argument 737 tls_mte_aad(struct tls_enable * en,size_t len,const struct tls_record_layer * hdr,uint64_t seqno,struct tls_mac_data * ad) tls_mte_aad() argument 748 tls_12_aead_aad(struct tls_enable * en,size_t len,const struct tls_record_layer * hdr,uint64_t seqno,struct tls_aead_data * ad) tls_12_aead_aad() argument 760 tls_13_aad(struct tls_enable * en,const struct tls_record_layer * hdr,uint64_t seqno,struct tls_aead_data_13 * ad) tls_13_aad() argument 770 tls_12_gcm_nonce(struct tls_enable * en,const struct tls_record_layer * hdr,char * nonce) tls_12_gcm_nonce() argument 778 tls_13_nonce(struct tls_enable * en,uint64_t seqno,char * nonce) tls_13_nonce() argument 792 decrypt_tls_aes_cbc_mte(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,const void * src,size_t len,void * dst,size_t avail,uint8_t * record_type) decrypt_tls_aes_cbc_mte() argument 859 decrypt_tls_12_aead(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,const void * src,size_t len,void * dst,uint8_t * record_type) decrypt_tls_12_aead() argument 894 decrypt_tls_13_aead(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,const void * src,size_t len,void * dst,uint8_t * record_type) decrypt_tls_13_aead() argument 944 decrypt_tls_aead(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,const void * src,size_t len,void * dst,size_t avail,uint8_t * record_type) decrypt_tls_aead() argument 969 decrypt_tls_record(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,const void * src,size_t len,void * dst,size_t avail,uint8_t * record_type) decrypt_tls_record() argument 988 encrypt_tls_aes_cbc_mte(const atf_tc_t * tc,struct tls_enable * en,uint8_t record_type,uint64_t seqno,const void * src,size_t len,void * dst,size_t avail,size_t padding) encrypt_tls_aes_cbc_mte() argument 1050 encrypt_tls_12_aead(const atf_tc_t * tc,struct tls_enable * en,uint8_t record_type,uint64_t seqno,const void * src,size_t len,void * dst) encrypt_tls_12_aead() argument 1090 encrypt_tls_13_aead(const atf_tc_t * tc,struct tls_enable * en,uint8_t record_type,uint64_t seqno,const void * src,size_t len,void * dst,size_t padding) encrypt_tls_13_aead() argument 1138 encrypt_tls_aead(const atf_tc_t * tc,struct tls_enable * en,uint8_t record_type,uint64_t seqno,const void * src,size_t len,void * dst,size_t avail,size_t padding) encrypt_tls_aead() argument 1161 encrypt_tls_record(const atf_tc_t * tc,struct tls_enable * en,uint8_t record_type,uint64_t seqno,const void * src,size_t len,void * dst,size_t avail,size_t padding) encrypt_tls_record() argument 1174 test_ktls_transmit_app_data(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_transmit_app_data() argument 1325 test_ktls_transmit_control(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,uint8_t type,size_t len) test_ktls_transmit_control() argument 1385 test_ktls_transmit_empty_fragment(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno) test_ktls_transmit_empty_fragment() argument 1450 ktls_receive_tls_record(struct tls_enable * en,int fd,uint8_t record_type,void * data,size_t len) ktls_receive_tls_record() argument 1494 test_ktls_receive_app_data(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len,size_t padding) test_ktls_receive_app_data() argument 1615 test_ktls_receive_corrupted_record(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len,ssize_t offset) test_ktls_receive_corrupted_record() argument 1658 test_ktls_receive_corrupted_iv(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_corrupted_iv() argument 1669 test_ktls_receive_corrupted_data(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_corrupted_data() argument 1680 test_ktls_receive_corrupted_mac(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_corrupted_mac() argument 1694 test_ktls_receive_corrupted_padding(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_corrupted_padding() argument 1704 test_ktls_receive_truncated_record(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_truncated_record() argument 1744 test_ktls_receive_bad_major(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_bad_major() argument 1786 test_ktls_receive_bad_minor(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_bad_minor() argument 1828 test_ktls_receive_bad_type(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_bad_type() argument 1871 test_ktls_receive_bad_size(const atf_tc_t * tc,struct tls_enable * en,uint64_t seqno,size_t len) test_ktls_receive_bad_size() argument 2161 test_ktls_invalid_transmit_cipher_suite(const atf_tc_t * tc,struct tls_enable * en) test_ktls_invalid_transmit_cipher_suite() argument 2657 test_ktls_invalid_receive_cipher_suite(const atf_tc_t * tc,struct tls_enable * en) test_ktls_invalid_receive_cipher_suite() argument 2696 test_ktls_unsupported_receive_cipher_suite(const atf_tc_t * tc,struct tls_enable * en) test_ktls_unsupported_receive_cipher_suite() argument 2743 struct tls_enable en; ATF_TC_BODY() local 2780 struct tls_enable en; ATF_TC_BODY() local [all...] |