Lines Matching refs:uint8
182 unsigned char type, uint8 *buf_array[],
201 uint8 *buf, size_t buflen) { in dtls_send()
237 session_t *dst, uint8 *buf, size_t len) { in dtls_write()
261 dtls_get_cookie(uint8 *msg, size_t msglen, uint8 **cookie) { in dtls_get_cookie()
264 if (msglen < DTLS_HS_LENGTH + DTLS_CH_LENGTH + sizeof(uint8)) in dtls_get_cookie()
273 SKIP_VAR_FIELD(msg, msglen, uint8); /* skip session id */ in dtls_get_cookie()
275 if (msglen < (*msg & 0xff) + sizeof(uint8)) in dtls_get_cookie()
278 *cookie = msg + sizeof(uint8); in dtls_get_cookie()
288 uint8 *msg, size_t msglen, in dtls_create_cookie()
289 uint8 *cookie, int *clen) { in dtls_create_cookie()
318 e += (*(msg + DTLS_HS_LENGTH + e) & 0xff) + sizeof(uint8); in dtls_create_cookie()
325 e += *(uint8 *)(msg + DTLS_HS_LENGTH + e) & 0xff; in dtls_create_cookie()
326 e += sizeof(uint8); in dtls_create_cookie()
361 is_record(uint8 *msg, size_t msglen) { in is_record()
389 static inline uint8 *
390 dtls_set_record_header(uint8 type, dtls_security_parameters_t *security, in dtls_set_record_header()
391 uint8 *buf) { in dtls_set_record_header()
394 buf += sizeof(uint8); in dtls_set_record_header()
423 static inline uint8 *
424 dtls_set_handshake_header(uint8 type, dtls_peer_t *peer, in dtls_set_handshake_header()
427 uint8 *buf) { in dtls_set_handshake_header()
430 buf += sizeof(uint8); in dtls_set_handshake_header()
456 static uint8 compression_methods[] = {
607 uint8 master_secret[DTLS_MASTER_SECRET_LENGTH]; in calculate_key_block()
701 static int verify_ext_eliptic_curves(uint8 *data, size_t data_length) { in verify_ext_eliptic_curves()
725 static int verify_ext_cert_type(uint8 *data, size_t data_length) { in verify_ext_cert_type()
730 data += sizeof(uint8); in verify_ext_cert_type()
731 if (i + sizeof(uint8) != data_length) { in verify_ext_cert_type()
736 for (i = data_length - sizeof(uint8); i > 0; i -= sizeof(uint8)) { in verify_ext_cert_type()
739 data += sizeof(uint8); in verify_ext_cert_type()
749 static int verify_ext_ec_point_formats(uint8 *data, size_t data_length) { in verify_ext_ec_point_formats()
754 data += sizeof(uint8); in verify_ext_ec_point_formats()
755 if (i + sizeof(uint8) != data_length) { in verify_ext_ec_point_formats()
760 for (i = data_length - sizeof(uint8); i > 0; i -= sizeof(uint8)) { in verify_ext_ec_point_formats()
763 data += sizeof(uint8); in verify_ext_ec_point_formats()
778 uint8 *data, size_t data_length, int client_hello) in dtls_check_tls_extension()
902 uint8 *data, size_t data_length) { in dtls_update_parameters()
921 SKIP_VAR_FIELD(data, data_length, uint8); /* skip session id */ in dtls_update_parameters()
922 SKIP_VAR_FIELD(data, data_length, uint8); /* skip cookie */ in dtls_update_parameters()
959 if (data_length < sizeof(uint8)) { in dtls_update_parameters()
969 if (data_length < i + sizeof(uint8)) in dtls_update_parameters()
972 data += sizeof(uint8); in dtls_update_parameters()
973 data_length -= sizeof(uint8) + i; in dtls_update_parameters()
977 for (j = 0; j < sizeof(compression_methods) / sizeof(uint8); ++j) in dtls_update_parameters()
982 i -= sizeof(uint8); in dtls_update_parameters()
983 data += sizeof(uint8); in dtls_update_parameters()
1007 uint8 *data, size_t length) { in check_client_keyexchange()
1022 data += sizeof(uint8); in check_client_keyexchange()
1028 data += sizeof(uint8); in check_client_keyexchange()
1070 update_hs_hash(dtls_peer_t *peer, uint8 *data, size_t length) { in update_hs_hash()
1082 finalize_hs_hash(dtls_peer_t *peer, uint8 *buf) { in finalize_hs_hash()
1105 uint8 *data, size_t data_length) { in check_finished()
1182 uint8 *data_array[], size_t data_len_array[], in dtls_prepare_record()
1184 uint8 *sendbuf, size_t *rlen) { in dtls_prepare_record()
1185 uint8 *p, *start; in dtls_prepare_record()
1326 uint8 header_type, in dtls_send_handshake_msg_hash()
1327 uint8 *data, size_t data_length, in dtls_send_handshake_msg_hash()
1330 uint8 buf[DTLS_HS_LENGTH]; in dtls_send_handshake_msg_hash()
1331 uint8 *data_array[2]; in dtls_send_handshake_msg_hash()
1363 uint8 header_type, in dtls_send_handshake_msg()
1364 uint8 *data, size_t data_length) in dtls_send_handshake_msg()
1409 unsigned char type, uint8 *buf_array[], in dtls_send_multi()
1543 uint8 *data, size_t data_length) in dtls_verify_peer()
1545 uint8 buf[DTLS_HV_LENGTH + DTLS_COOKIE_LENGTH]; in dtls_verify_peer()
1546 uint8 *p = buf; in dtls_verify_peer()
1548 uint8 *cookie = NULL; in dtls_verify_peer()
1590 p += sizeof(uint8); in dtls_verify_peer()
1611 dtls_check_ecdsa_signature_elem(uint8 *data, size_t data_length, in dtls_check_ecdsa_signature_elem()
1616 uint8 *data_orig = data; in dtls_check_ecdsa_signature_elem()
1622 data += sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1623 data_length -= sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1629 data += sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1630 data_length -= sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1643 data += sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1644 data_length -= sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1650 data += sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1651 data_length -= sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1657 data += sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1658 data_length -= sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1661 data += sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1662 data_length -= sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1674 data += sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1675 data_length -= sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1678 data += sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1679 data_length -= sizeof(uint8); in dtls_check_ecdsa_signature_elem()
1693 uint8 *data, size_t data_length) in check_client_certificate_verify()
1741 uint8 buf[DTLS_SH_LENGTH + 2 + 5 + 5 + 8 + 6]; in dtls_send_server_hello()
1742 uint8 *p; in dtls_send_server_hello()
1744 uint8 extension_size; in dtls_send_server_hello()
1795 p += sizeof(uint8); in dtls_send_server_hello()
1806 p += sizeof(uint8); in dtls_send_server_hello()
1818 p += sizeof(uint8); in dtls_send_server_hello()
1821 p += sizeof(uint8); in dtls_send_server_hello()
1837 uint8 buf[DTLS_CE_LENGTH]; in dtls_send_certificate_ecdsa()
1838 uint8 *p; in dtls_send_certificate_ecdsa()
1866 static uint8 *
1867 dtls_add_ecdsa_signature_elem(uint8 *p, uint32_t *point_r, uint32_t *point_s) in dtls_add_ecdsa_signature_elem()
1883 p += sizeof(uint8); in dtls_add_ecdsa_signature_elem()
1887 p += sizeof(uint8); in dtls_add_ecdsa_signature_elem()
1895 p += sizeof(uint8); in dtls_add_ecdsa_signature_elem()
1898 p += sizeof(uint8); in dtls_add_ecdsa_signature_elem()
1902 p += sizeof(uint8); in dtls_add_ecdsa_signature_elem()
1905 p += sizeof(uint8); in dtls_add_ecdsa_signature_elem()
1912 p += sizeof(uint8); in dtls_add_ecdsa_signature_elem()
1915 p += sizeof(uint8); in dtls_add_ecdsa_signature_elem()
1929 uint8 buf[DTLS_SKEXEC_LENGTH + 2]; in dtls_send_server_key_exchange_ecdh()
1930 uint8 *p; in dtls_send_server_key_exchange_ecdh()
1931 uint8 *key_params; in dtls_send_server_key_exchange_ecdh()
1932 uint8 *ephemeral_pub_x; in dtls_send_server_key_exchange_ecdh()
1933 uint8 *ephemeral_pub_y; in dtls_send_server_key_exchange_ecdh()
1946 p += sizeof(uint8); in dtls_send_server_key_exchange_ecdh()
1953 p += sizeof(uint8); in dtls_send_server_key_exchange_ecdh()
1957 p += sizeof(uint8); in dtls_send_server_key_exchange_ecdh()
1992 uint8 buf[DTLS_SKEXECPSK_LENGTH_MAX]; in dtls_send_server_key_exchange_psk()
1993 uint8 *p; in dtls_send_server_key_exchange_psk()
2021 uint8 buf[8]; in dtls_send_server_certificate_request()
2022 uint8 *p; in dtls_send_server_certificate_request()
2031 p += sizeof(uint8); in dtls_send_server_certificate_request()
2035 p += sizeof(uint8); in dtls_send_server_certificate_request()
2043 p += sizeof(uint8); in dtls_send_server_certificate_request()
2047 p += sizeof(uint8); in dtls_send_server_certificate_request()
2157 uint8 buf[1] = {1}; in dtls_send_ccs()
2166 uint8 buf[DTLS_CKXEC_LENGTH]; in dtls_send_client_key_exchange()
2167 uint8 *p; in dtls_send_client_key_exchange()
2206 uint8 *ephemeral_pub_x; in dtls_send_client_key_exchange()
2207 uint8 *ephemeral_pub_y; in dtls_send_client_key_exchange()
2210 p += sizeof(uint8); in dtls_send_client_key_exchange()
2214 p += sizeof(uint8); in dtls_send_client_key_exchange()
2246 uint8 buf[DTLS_CV_LENGTH + 2]; in dtls_send_certificate_verify_ecdh()
2247 uint8 *p; in dtls_send_certificate_verify_ecdh()
2281 uint8 hash[DTLS_HMAC_MAX]; in dtls_send_finished()
2282 uint8 buf[DTLS_FIN_LENGTH]; in dtls_send_finished()
2284 uint8 *p = buf; in dtls_send_finished()
2309 uint8 cookie[], size_t cookie_length) { in dtls_send_client_hello()
2310 uint8 buf[DTLS_CH_LENGTH_MAX]; in dtls_send_client_hello()
2311 uint8 *p = buf; in dtls_send_client_hello()
2351 p += sizeof(uint8); in dtls_send_client_hello()
2355 p += sizeof(uint8); in dtls_send_client_hello()
2376 p += sizeof(uint8); in dtls_send_client_hello()
2379 p += sizeof(uint8); in dtls_send_client_hello()
2398 p += sizeof(uint8); in dtls_send_client_hello()
2401 p += sizeof(uint8); in dtls_send_client_hello()
2413 p += sizeof(uint8); in dtls_send_client_hello()
2416 p += sizeof(uint8); in dtls_send_client_hello()
2443 p += sizeof(uint8); in dtls_send_client_hello()
2446 p += sizeof(uint8); in dtls_send_client_hello()
2462 uint8 *data, size_t data_length) in check_server_hello()
2501 SKIP_VAR_FIELD(data, data_length, uint8); /* skip session id */ in check_server_hello()
2520 data += sizeof(uint8); in check_server_hello()
2521 data_length -= sizeof(uint8); in check_server_hello()
2532 uint8 *data, size_t data_length) in check_server_hello_verify_request()
2554 uint8 *data, size_t data_length) in check_server_certificate()
2606 uint8 *data, size_t data_length) in check_server_key_exchange_ecdsa()
2630 data += sizeof(uint8); in check_server_key_exchange_ecdsa()
2631 data_length -= sizeof(uint8); in check_server_key_exchange_ecdsa()
2644 data += sizeof(uint8); in check_server_key_exchange_ecdsa()
2645 data_length -= sizeof(uint8); in check_server_key_exchange_ecdsa()
2651 data += sizeof(uint8); in check_server_key_exchange_ecdsa()
2652 data_length -= sizeof(uint8); in check_server_key_exchange_ecdsa()
2689 uint8 *data, size_t data_length) in check_server_key_exchange_psk()
2728 uint8 *data, size_t data_length) in check_certificate_request()
2747 data += sizeof(uint8); in check_certificate_request()
2754 for (; i > 0 ; i -= sizeof(uint8)) { in check_certificate_request()
2758 data += sizeof(uint8); in check_certificate_request()
2780 data += sizeof(uint8); in check_certificate_request()
2782 data += sizeof(uint8); in check_certificate_request()
2806 uint8 *data, size_t data_length) in check_server_hellodone()
2877 decrypt_verify(dtls_peer_t *peer, uint8 *packet, size_t length, in decrypt_verify()
2878 uint8 **cleartext) in decrypt_verify()
2884 *cleartext = (uint8 *)packet + sizeof(dtls_record_header_t); in decrypt_verify()
2994 uint8 *data, size_t data_length) { in handle_handshake_msg()
3349 uint8 *data, size_t data_length) in handle_handshake()
3458 uint8 *record_header, uint8 *data, size_t data_length) in handle_ccs()
3497 uint8 *record_header, uint8 *data, size_t data_length) { in handle_alert()
3593 uint8 *msg, int msglen) { in dtls_handle_message()
3596 uint8 *data; /* (decrypted) payload */ in dtls_handle_message()