• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/crypto/openssl/ssl/statem/

Lines Matching defs:pkt

41 int tls_parse_ctos_renegotiate(SSL *s, PACKET *pkt, unsigned int context,
48 if (!PACKET_get_1(pkt, &ilen)
49 || !PACKET_get_bytes(pkt, &data, ilen)) {
97 int tls_parse_ctos_server_name(SSL *s, PACKET *pkt, unsigned int context,
103 if (!PACKET_as_length_prefixed_2(pkt, &sni)
180 int tls_parse_ctos_maxfragmentlen(SSL *s, PACKET *pkt, unsigned int context,
185 if (PACKET_remaining(pkt) != 1 || !PACKET_get_1(pkt, &value)) {
220 int tls_parse_ctos_srp(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
225 if (!PACKET_as_length_prefixed_1(pkt, &srp_I)
248 int tls_parse_ctos_ec_pt_formats(SSL *s, PACKET *pkt, unsigned int context,
253 if (!PACKET_as_length_prefixed_1(pkt, &ec_point_format_list)
274 int tls_parse_ctos_session_ticket(SSL *s, PACKET *pkt, unsigned int context,
278 !s->ext.session_ticket_cb(s, PACKET_data(pkt),
279 PACKET_remaining(pkt),
289 int tls_parse_ctos_sig_algs_cert(SSL *s, PACKET *pkt, unsigned int context,
294 if (!PACKET_as_length_prefixed_2(pkt, &supported_sig_algs)
310 int tls_parse_ctos_sig_algs(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
315 if (!PACKET_as_length_prefixed_2(pkt, &supported_sig_algs)
332 int tls_parse_ctos_status_request(SSL *s, PACKET *pkt, unsigned int context,
345 if (!PACKET_get_1(pkt, (unsigned int *)&s->ext.status_type)) {
359 if (!PACKET_get_length_prefixed_2 (pkt, &responder_id_list)) {
421 if (!PACKET_as_length_prefixed_2(pkt, &exts)) {
446 int tls_parse_ctos_npn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
461 * Save the ALPN extension in a ClientHello.|pkt| holds the contents of the ALPN
464 int tls_parse_ctos_alpn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
472 if (!PACKET_as_length_prefixed_2(pkt, &protocol_list)
504 int tls_parse_ctos_use_srtp(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
517 if (!PACKET_get_net_2(pkt, &ct) || (ct & 1) != 0
518 || !PACKET_get_sub_packet(pkt, &subpkt, ct)) {
555 if (!PACKET_get_1(pkt, &mki_len)) {
561 if (!PACKET_forward(pkt, mki_len)
562 || PACKET_remaining(pkt)) {
572 int tls_parse_ctos_etm(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
582 * Process a psk_kex_modes extension received in the ClientHello. |pkt| contains
585 int tls_parse_ctos_psk_kex_modes(SSL *s, PACKET *pkt, unsigned int context,
592 if (!PACKET_as_length_prefixed_1(pkt, &psk_kex_modes)
612 * Process a key_share extension received in the ClientHello. |pkt| contains
615 int tls_parse_ctos_key_share(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
635 if (!PACKET_as_length_prefixed_2(pkt, &key_share_list)) {
731 int tls_parse_ctos_cookie(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
751 if (!PACKET_as_length_prefixed_2(pkt, &cookie)) {
955 int tls_parse_ctos_supported_groups(SSL *s, PACKET *pkt, unsigned int context,
961 if (!PACKET_as_length_prefixed_2(pkt, &supported_groups_list)
987 int tls_parse_ctos_ems(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
991 if (PACKET_remaining(pkt) != 0) {
1003 int tls_parse_ctos_early_data(SSL *s, PACKET *pkt, unsigned int context,
1006 if (PACKET_remaining(pkt) != 0) {
1049 int tls_parse_ctos_psk(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
1066 if (!PACKET_get_length_prefixed_2(pkt, &identities)) {
1253 binderoffset = PACKET_data(pkt) - (const unsigned char *)s->init_buf->data;
1256 if (!PACKET_get_length_prefixed_2(pkt, &binders)) {
1292 int tls_parse_ctos_post_handshake_auth(SSL *s, PACKET *pkt, unsigned int context,
1295 if (PACKET_remaining(pkt) != 0) {
1309 EXT_RETURN tls_construct_stoc_renegotiate(SSL *s, WPACKET *pkt,
1317 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
1318 || !WPACKET_start_sub_packet_u16(pkt)
1319 || !WPACKET_start_sub_packet_u8(pkt)
1320 || !WPACKET_memcpy(pkt, s->s3->previous_client_finished,
1322 || !WPACKET_memcpy(pkt, s->s3->previous_server_finished,
1324 || !WPACKET_close(pkt)
1325 || !WPACKET_close(pkt)) {
1334 EXT_RETURN tls_construct_stoc_server_name(SSL *s, WPACKET *pkt,
1348 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_name)
1349 || !WPACKET_put_bytes_u16(pkt, 0)) {
1359 EXT_RETURN tls_construct_stoc_maxfragmentlen(SSL *s, WPACKET *pkt,
1370 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_max_fragment_length)
1371 || !WPACKET_start_sub_packet_u16(pkt)
1372 || !WPACKET_put_bytes_u8(pkt, s->session->ext.max_fragment_len_mode)
1373 || !WPACKET_close(pkt)) {
1383 EXT_RETURN tls_construct_stoc_ec_pt_formats(SSL *s, WPACKET *pkt,
1398 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ec_point_formats)
1399 || !WPACKET_start_sub_packet_u16(pkt)
1400 || !WPACKET_sub_memcpy_u8(pkt, plist, plistlen)
1401 || !WPACKET_close(pkt)) {
1412 EXT_RETURN tls_construct_stoc_supported_groups(SSL *s, WPACKET *pkt,
1445 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_groups)
1447 || !WPACKET_start_sub_packet_u16(pkt)
1448 || !WPACKET_start_sub_packet_u16(pkt)) {
1457 if (!WPACKET_put_bytes_u16(pkt, group)) {
1466 if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
1477 EXT_RETURN tls_construct_stoc_session_ticket(SSL *s, WPACKET *pkt,
1486 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_session_ticket)
1487 || !WPACKET_put_bytes_u16(pkt, 0)) {
1497 EXT_RETURN tls_construct_stoc_status_request(SSL *s, WPACKET *pkt,
1511 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_status_request)
1512 || !WPACKET_start_sub_packet_u16(pkt)) {
1523 if (SSL_IS_TLS13(s) && !tls_construct_cert_status_body(s, pkt)) {
1527 if (!WPACKET_close(pkt)) {
1538 EXT_RETURN tls_construct_stoc_next_proto_neg(SSL *s, WPACKET *pkt,
1554 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_next_proto_neg)
1555 || !WPACKET_sub_memcpy_u16(pkt, npa, npalen)) {
1568 EXT_RETURN tls_construct_stoc_alpn(SSL *s, WPACKET *pkt, unsigned int context,
1574 if (!WPACKET_put_bytes_u16(pkt,
1576 || !WPACKET_start_sub_packet_u16(pkt)
1577 || !WPACKET_start_sub_packet_u16(pkt)
1578 || !WPACKET_sub_memcpy_u8(pkt, s->s3->alpn_selected,
1580 || !WPACKET_close(pkt)
1581 || !WPACKET_close(pkt)) {
1591 EXT_RETURN tls_construct_stoc_use_srtp(SSL *s, WPACKET *pkt,
1598 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_use_srtp)
1599 || !WPACKET_start_sub_packet_u16(pkt)
1600 || !WPACKET_put_bytes_u16(pkt, 2)
1601 || !WPACKET_put_bytes_u16(pkt, s->srtp_profile->id)
1602 || !WPACKET_put_bytes_u8(pkt, 0)
1603 || !WPACKET_close(pkt)) {
1613 EXT_RETURN tls_construct_stoc_etm(SSL *s, WPACKET *pkt, unsigned int context,
1631 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_encrypt_then_mac)
1632 || !WPACKET_put_bytes_u16(pkt, 0)) {
1641 EXT_RETURN tls_construct_stoc_ems(SSL *s, WPACKET *pkt, unsigned int context,
1647 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_extended_master_secret)
1648 || !WPACKET_put_bytes_u16(pkt, 0)) {
1657 EXT_RETURN tls_construct_stoc_supported_versions(SSL *s, WPACKET *pkt,
1668 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_versions)
1669 || !WPACKET_start_sub_packet_u16(pkt)
1670 || !WPACKET_put_bytes_u16(pkt, s->version)
1671 || !WPACKET_close(pkt)) {
1681 EXT_RETURN tls_construct_stoc_key_share(SSL *s, WPACKET *pkt,
1695 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
1696 || !WPACKET_start_sub_packet_u16(pkt)
1697 || !WPACKET_put_bytes_u16(pkt, s->s3->group_id)
1698 || !WPACKET_close(pkt)) {
1718 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
1719 || !WPACKET_start_sub_packet_u16(pkt)
1720 || !WPACKET_put_bytes_u16(pkt, s->s3->group_id)) {
1742 if (!WPACKET_sub_memcpy_u16(pkt, encodedPoint, encoded_pt_len)
1743 || !WPACKET_close(pkt)) {
1764 EXT_RETURN tls_construct_stoc_cookie(SSL *s, WPACKET *pkt, unsigned int context,
1784 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_cookie)
1785 || !WPACKET_start_sub_packet_u16(pkt)
1786 || !WPACKET_start_sub_packet_u16(pkt)
1787 || !WPACKET_get_total_written(pkt, &startlen)
1788 || !WPACKET_reserve_bytes(pkt, MAX_COOKIE_SIZE, &cookie)
1789 || !WPACKET_put_bytes_u16(pkt, COOKIE_STATE_FORMAT_VERSION)
1790 || !WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION)
1791 || !WPACKET_put_bytes_u16(pkt, s->s3->group_id)
1792 || !s->method->put_cipher_by_char(s->s3->tmp.new_cipher, pkt,
1795 || !WPACKET_put_bytes_u8(pkt, s->s3->peer_tmp == NULL)
1796 || !WPACKET_put_bytes_u32(pkt, (unsigned int)time(NULL))
1797 || !WPACKET_start_sub_packet_u16(pkt)
1798 || !WPACKET_reserve_bytes(pkt, EVP_MAX_MD_SIZE, &hashval1)) {
1815 if (!WPACKET_allocate_bytes(pkt, hashlen, &hashval2)
1817 || !WPACKET_close(pkt)
1818 || !WPACKET_start_sub_packet_u8(pkt)
1819 || !WPACKET_reserve_bytes(pkt, SSL_COOKIE_LENGTH, &appcookie1)) {
1832 if (!WPACKET_allocate_bytes(pkt, appcookielen, &appcookie2)
1834 || !WPACKET_close(pkt)
1835 || !WPACKET_get_total_written(pkt, &totcookielen)
1836 || !WPACKET_reserve_bytes(pkt, SHA256_DIGEST_LENGTH, &hmac)) {
1876 if (!WPACKET_allocate_bytes(pkt, hmaclen, &hmac2)
1879 || !WPACKET_close(pkt)
1880 || !WPACKET_close(pkt)) {
1897 EXT_RETURN tls_construct_stoc_cryptopro_bug(SSL *s, WPACKET *pkt,
1915 if (!WPACKET_memcpy(pkt, cryptopro_ext, sizeof(cryptopro_ext))) {
1924 EXT_RETURN tls_construct_stoc_early_data(SSL *s, WPACKET *pkt,
1932 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
1933 || !WPACKET_start_sub_packet_u16(pkt)
1934 || !WPACKET_put_bytes_u32(pkt, s->max_early_data)
1935 || !WPACKET_close(pkt)) {
1947 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
1948 || !WPACKET_start_sub_packet_u16(pkt)
1949 || !WPACKET_close(pkt)) {
1958 EXT_RETURN tls_construct_stoc_psk(SSL *s, WPACKET *pkt, unsigned int context,
1964 if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk)
1965 || !WPACKET_start_sub_packet_u16(pkt)
1966 || !WPACKET_put_bytes_u16(pkt, s->ext.tick_identity)
1967 || !WPACKET_close(pkt)) {