Lines Matching full:contents
460 // The parse callbacks receive a |CBS| that contains the contents of the
490 CBS *contents);
493 CBS *contents);
498 CBS *contents) { in forbid_parse_serverhello() argument
499 if (contents != NULL) { in forbid_parse_serverhello()
510 CBS *contents) { in ignore_parse_clienthello() argument
540 CBB contents, server_name_list, name; in ext_sni_add_clienthello() local
542 !CBB_add_u16_length_prefixed(out, &contents) || in ext_sni_add_clienthello()
543 !CBB_add_u16_length_prefixed(&contents, &server_name_list) || in ext_sni_add_clienthello()
555 CBS *contents) { in ext_sni_parse_serverhello() argument
558 return contents == NULL || CBS_len(contents) == 0; in ext_sni_parse_serverhello()
562 CBS *contents) { in ext_sni_parse_clienthello() argument
615 CBS *contents) { in ext_ech_parse_serverhello() argument
617 if (contents == NULL) { in ext_ech_parse_serverhello()
631 if (!ssl_is_valid_ech_config_list(*contents)) { in ext_ech_parse_serverhello()
637 !hs->ech_retry_configs.CopyFrom(*contents)) { in ext_ech_parse_serverhello()
646 CBS *contents) { in ext_ech_parse_clienthello() argument
647 if (contents == nullptr) { in ext_ech_parse_clienthello()
652 if (!CBS_get_u8(contents, &type)) { in ext_ech_parse_clienthello()
659 if (type != ECH_CLIENT_INNER || CBS_len(contents) != 0) { in ext_ech_parse_clienthello()
713 CBB contents, prev_finished; in ext_ri_add_clienthello() local
715 !CBB_add_u16_length_prefixed(out, &contents) || in ext_ri_add_clienthello()
716 !CBB_add_u8_length_prefixed(&contents, &prev_finished) || in ext_ri_add_clienthello()
727 CBS *contents) { in ext_ri_parse_serverhello() argument
729 if (contents != NULL && ssl_protocol_version(ssl) >= TLS1_3_VERSION) { in ext_ri_parse_serverhello()
737 (contents != NULL) != ssl->s3->send_connection_binding) { in ext_ri_parse_serverhello()
743 if (contents == NULL) { in ext_ri_parse_serverhello()
765 // Parse out the extension contents. in ext_ri_parse_serverhello()
767 if (!CBS_get_u8_length_prefixed(contents, &renegotiated_connection) || in ext_ri_parse_serverhello()
768 CBS_len(contents) != 0) { in ext_ri_parse_serverhello()
810 CBS *contents) { in ext_ri_parse_clienthello() argument
820 if (contents == NULL) { in ext_ri_parse_clienthello()
825 if (!CBS_get_u8_length_prefixed(contents, &renegotiated_connection) || in ext_ri_parse_clienthello()
826 CBS_len(contents) != 0) { in ext_ri_parse_clienthello()
885 CBS *contents) { in ext_ems_parse_serverhello() argument
888 if (contents != NULL) { in ext_ems_parse_serverhello()
890 CBS_len(contents) != 0) { in ext_ems_parse_serverhello()
910 CBS *contents) { in ext_ems_parse_clienthello() argument
915 if (contents == NULL) { in ext_ems_parse_clienthello()
919 if (CBS_len(contents) != 0) { in ext_ems_parse_clienthello()
981 CBS *contents) { in ext_ticket_parse_serverhello() argument
983 if (contents == NULL) { in ext_ticket_parse_serverhello()
996 if (CBS_len(contents) != 0) { in ext_ticket_parse_serverhello()
1032 CBB contents, sigalgs_cbb; in ext_sigalgs_add_clienthello() local
1034 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_sigalgs_add_clienthello()
1035 !CBB_add_u16_length_prefixed(&contents, &sigalgs_cbb) || in ext_sigalgs_add_clienthello()
1045 CBS *contents) { in ext_sigalgs_parse_clienthello() argument
1047 if (contents == NULL) { in ext_sigalgs_parse_clienthello()
1052 if (!CBS_get_u16_length_prefixed(contents, &supported_signature_algorithms) || in ext_sigalgs_parse_clienthello()
1053 CBS_len(contents) != 0 || in ext_sigalgs_parse_clienthello()
1073 CBB contents; in ext_ocsp_add_clienthello() local
1075 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_ocsp_add_clienthello()
1076 !CBB_add_u8(&contents, TLSEXT_STATUSTYPE_ocsp) || in ext_ocsp_add_clienthello()
1077 !CBB_add_u16(&contents, 0 /* empty responder ID list */) || in ext_ocsp_add_clienthello()
1078 !CBB_add_u16(&contents, 0 /* empty request extensions */) || in ext_ocsp_add_clienthello()
1087 CBS *contents) { in ext_ocsp_parse_serverhello() argument
1089 if (contents == NULL) { in ext_ocsp_parse_serverhello()
1099 if (CBS_len(contents) != 0 || in ext_ocsp_parse_serverhello()
1113 CBS *contents) { in ext_ocsp_parse_clienthello() argument
1114 if (contents == NULL) { in ext_ocsp_parse_clienthello()
1119 if (!CBS_get_u8(contents, &status_type)) { in ext_ocsp_parse_clienthello()
1172 CBS *contents) { in ext_npn_parse_serverhello() argument
1174 if (contents == NULL) { in ext_npn_parse_serverhello()
1196 const uint8_t *const orig_contents = CBS_data(contents); in ext_npn_parse_serverhello()
1197 const size_t orig_len = CBS_len(contents); in ext_npn_parse_serverhello()
1199 while (CBS_len(contents) != 0) { in ext_npn_parse_serverhello()
1201 if (!CBS_get_u8_length_prefixed(contents, &proto) || in ext_npn_parse_serverhello()
1225 CBS *contents) { in ext_npn_parse_clienthello() argument
1231 if (contents != NULL && CBS_len(contents) != 0) { in ext_npn_parse_clienthello()
1235 if (contents == NULL || in ext_npn_parse_clienthello()
1264 CBB contents; in ext_npn_add_serverhello() local
1266 !CBB_add_u16_length_prefixed(out, &contents) || in ext_npn_add_serverhello()
1267 !CBB_add_bytes(&contents, npa, npa_len) || in ext_npn_add_serverhello()
1296 CBS *contents) { in ext_sct_parse_serverhello() argument
1298 if (contents == NULL) { in ext_sct_parse_serverhello()
1312 if (!ssl_is_sct_list_valid(contents)) { in ext_sct_parse_serverhello()
1324 CRYPTO_BUFFER_new_from_CBS(contents, ssl->ctx->pool)); in ext_sct_parse_serverhello()
1335 CBS *contents) { in ext_sct_parse_clienthello() argument
1336 if (contents == NULL) { in ext_sct_parse_clienthello()
1340 if (CBS_len(contents) != 0) { in ext_sct_parse_clienthello()
1358 CBB contents; in ext_sct_add_serverhello() local
1360 CBB_add_u16_length_prefixed(out, &contents) && in ext_sct_add_serverhello()
1361 CBB_add_bytes(&contents, in ext_sct_add_serverhello()
1389 CBB contents, proto_list; in ext_alpn_add_clienthello() local
1392 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_alpn_add_clienthello()
1393 !CBB_add_u16_length_prefixed(&contents, &proto_list) || in ext_alpn_add_clienthello()
1404 CBS *contents) { in ext_alpn_parse_serverhello() argument
1406 if (contents == NULL) { in ext_alpn_parse_serverhello()
1429 if (!CBS_get_u16_length_prefixed(contents, &protocol_name_list) || in ext_alpn_parse_serverhello()
1430 CBS_len(contents) != 0 || in ext_alpn_parse_serverhello()
1502 CBS contents; in ssl_negotiate_alpn() local
1505 client_hello, &contents, in ssl_negotiate_alpn()
1521 if (!CBS_get_u16_length_prefixed(&contents, &protocol_name_list) || in ssl_negotiate_alpn()
1522 CBS_len(&contents) != 0 || in ssl_negotiate_alpn()
1578 CBB contents, proto_list, proto; in ext_alpn_add_serverhello() local
1580 !CBB_add_u16_length_prefixed(out, &contents) || in ext_alpn_add_serverhello()
1581 !CBB_add_u16_length_prefixed(&contents, &proto_list) || in ext_alpn_add_serverhello()
1624 CBS *contents) { in ext_channel_id_parse_serverhello() argument
1625 if (contents == NULL) { in ext_channel_id_parse_serverhello()
1632 if (CBS_len(contents) != 0) { in ext_channel_id_parse_serverhello()
1642 CBS *contents) { in ext_channel_id_parse_clienthello() argument
1644 if (contents == NULL || !hs->config->channel_id_enabled || SSL_is_dtls(ssl)) { in ext_channel_id_parse_clienthello()
1648 if (CBS_len(contents) != 0) { in ext_channel_id_parse_clienthello()
1686 CBB contents, profile_ids; in ext_srtp_add_clienthello() local
1688 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_srtp_add_clienthello()
1689 !CBB_add_u16_length_prefixed(&contents, &profile_ids)) { in ext_srtp_add_clienthello()
1699 if (!CBB_add_u8(&contents, 0 /* empty use_mki value */) || in ext_srtp_add_clienthello()
1708 CBS *contents) { in ext_srtp_parse_serverhello() argument
1710 if (contents == NULL) { in ext_srtp_parse_serverhello()
1721 if (!CBS_get_u16_length_prefixed(contents, &profile_ids) || in ext_srtp_parse_serverhello()
1724 !CBS_get_u8_length_prefixed(contents, &srtp_mki) || in ext_srtp_parse_serverhello()
1725 CBS_len(contents) != 0) { in ext_srtp_parse_serverhello()
1751 CBS *contents) { in ext_srtp_parse_clienthello() argument
1754 if (contents == NULL || !SSL_is_dtls(ssl)) { in ext_srtp_parse_clienthello()
1759 if (!CBS_get_u16_length_prefixed(contents, &profile_ids) || in ext_srtp_parse_clienthello()
1761 !CBS_get_u8_length_prefixed(contents, &srtp_mki) || in ext_srtp_parse_clienthello()
1762 CBS_len(contents) != 0) { in ext_srtp_parse_clienthello()
1799 CBB contents, profile_ids; in ext_srtp_add_serverhello() local
1801 !CBB_add_u16_length_prefixed(out, &contents) || in ext_srtp_add_serverhello()
1802 !CBB_add_u16_length_prefixed(&contents, &profile_ids) || in ext_srtp_add_serverhello()
1804 !CBB_add_u8(&contents, 0 /* empty MKI */) || in ext_srtp_add_serverhello()
1818 CBB contents, formats; in ext_ec_point_add_extension() local
1820 !CBB_add_u16_length_prefixed(out, &contents) || in ext_ec_point_add_extension()
1821 !CBB_add_u8_length_prefixed(&contents, &formats) || in ext_ec_point_add_extension()
1842 CBS *contents) { in ext_ec_point_parse_serverhello() argument
1843 if (contents == NULL) { in ext_ec_point_parse_serverhello()
1852 if (!CBS_get_u8_length_prefixed(contents, &ec_point_format_list) || in ext_ec_point_parse_serverhello()
1853 CBS_len(contents) != 0) { in ext_ec_point_parse_serverhello()
1870 CBS *contents) { in ext_ec_point_parse_clienthello() argument
1875 return ext_ec_point_parse_serverhello(hs, out_alert, contents); in ext_ec_point_parse_clienthello()
1953 CBB contents, identity, ticket, binders, binder; in ext_pre_shared_key_add_clienthello() local
1955 !CBB_add_u16_length_prefixed(out, &contents) || in ext_pre_shared_key_add_clienthello()
1956 !CBB_add_u16_length_prefixed(&contents, &identity) || in ext_pre_shared_key_add_clienthello()
1961 !CBB_add_u16_length_prefixed(&contents, &binders) || in ext_pre_shared_key_add_clienthello()
1973 CBS *contents) { in ssl_ext_pre_shared_key_parse_serverhello() argument
1975 if (!CBS_get_u16(contents, &psk_id) || in ssl_ext_pre_shared_key_parse_serverhello()
1976 CBS_len(contents) != 0) { in ssl_ext_pre_shared_key_parse_serverhello()
1995 const SSL_CLIENT_HELLO *client_hello, CBS *contents) { in ssl_ext_pre_shared_key_parse_clienthello() argument
1998 if (CBS_data(contents) + CBS_len(contents) != in ssl_ext_pre_shared_key_parse_clienthello()
2007 if (!CBS_get_u16_length_prefixed(contents, &identities) || in ssl_ext_pre_shared_key_parse_clienthello()
2010 !CBS_get_u16_length_prefixed(contents, &binders) || in ssl_ext_pre_shared_key_parse_clienthello()
2012 CBS_len(contents) != 0) { in ssl_ext_pre_shared_key_parse_clienthello()
2063 CBB contents; in ssl_ext_pre_shared_key_add_serverhello() local
2065 !CBB_add_u16_length_prefixed(out, &contents) || in ssl_ext_pre_shared_key_add_serverhello()
2067 !CBB_add_u16(&contents, 0) || in ssl_ext_pre_shared_key_add_serverhello()
2087 CBB contents, ke_modes; in ext_psk_key_exchange_modes_add_clienthello() local
2089 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_psk_key_exchange_modes_add_clienthello()
2090 !CBB_add_u8_length_prefixed(&contents, &ke_modes) || in ext_psk_key_exchange_modes_add_clienthello()
2100 CBS *contents) { in ext_psk_key_exchange_modes_parse_clienthello() argument
2101 if (contents == NULL) { in ext_psk_key_exchange_modes_parse_clienthello()
2106 if (!CBS_get_u8_length_prefixed(contents, &ke_modes) || in ext_psk_key_exchange_modes_parse_clienthello()
2108 CBS_len(contents) != 0) { in ext_psk_key_exchange_modes_parse_clienthello()
2155 CBS *contents) { in ext_early_data_parse_serverhello() argument
2157 if (contents == NULL) { in ext_early_data_parse_serverhello()
2175 if (CBS_len(contents) != 0) { in ext_early_data_parse_serverhello()
2192 uint8_t *out_alert, CBS *contents) { in ext_early_data_parse_clienthello() argument
2194 if (contents == NULL || in ext_early_data_parse_clienthello()
2199 if (CBS_len(contents) != 0) { in ext_early_data_parse_clienthello()
2303 CBB contents, kse_bytes; in ext_key_share_add_clienthello() local
2305 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_key_share_add_clienthello()
2306 !CBB_add_u16_length_prefixed(&contents, &kse_bytes) || in ext_key_share_add_clienthello()
2318 uint8_t *out_alert, CBS *contents) { in ssl_ext_key_share_parse_serverhello() argument
2321 if (!CBS_get_u16(contents, &group_id) || in ssl_ext_key_share_parse_serverhello()
2322 !CBS_get_u16_length_prefixed(contents, &ciphertext) || in ssl_ext_key_share_parse_serverhello()
2323 CBS_len(contents) != 0) { in ssl_ext_key_share_parse_serverhello()
2355 CBS contents; in ssl_ext_key_share_parse_clienthello() local
2356 if (!ssl_client_hello_get_extension(client_hello, &contents, in ssl_ext_key_share_parse_clienthello()
2364 if (!CBS_get_u16_length_prefixed(&contents, &key_shares) || in ssl_ext_key_share_parse_clienthello()
2365 CBS_len(&contents) != 0) { in ssl_ext_key_share_parse_clienthello()
2436 CBB contents, versions; in ext_supported_versions_add_clienthello() local
2438 !CBB_add_u16_length_prefixed(out, &contents) || in ext_supported_versions_add_clienthello()
2439 !CBB_add_u8_length_prefixed(&contents, &versions)) { in ext_supported_versions_add_clienthello()
2472 CBB contents, cookie; in ext_cookie_add_clienthello() local
2474 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_cookie_add_clienthello()
2475 !CBB_add_u16_length_prefixed(&contents, &cookie) || in ext_cookie_add_clienthello()
2495 CBB contents, groups_bytes; in ext_supported_groups_add_clienthello() local
2497 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_supported_groups_add_clienthello()
2498 !CBB_add_u16_length_prefixed(&contents, &groups_bytes)) { in ext_supported_groups_add_clienthello()
2524 CBS *contents) { in ext_supported_groups_parse_serverhello() argument
2555 CBS *contents) { in ext_supported_groups_parse_clienthello() argument
2556 if (contents == NULL) { in ext_supported_groups_parse_clienthello()
2561 if (!CBS_get_u16_length_prefixed(contents, &supported_group_list) || in ext_supported_groups_parse_clienthello()
2563 CBS_len(contents) != 0 || in ext_supported_groups_parse_clienthello()
2597 CBB contents; in ext_quic_transport_params_add_clienthello_impl() local
2599 !CBB_add_u16_length_prefixed(out, &contents) || in ext_quic_transport_params_add_clienthello_impl()
2600 !CBB_add_bytes(&contents, hs->config->quic_transport_params.data(), in ext_quic_transport_params_add_clienthello_impl()
2623 SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents, in ext_quic_transport_params_parse_serverhello_impl() argument
2626 if (contents == nullptr) { in ext_quic_transport_params_parse_serverhello_impl()
2642 return ssl->s3->peer_quic_transport_params.CopyFrom(*contents); in ext_quic_transport_params_parse_serverhello_impl()
2647 CBS *contents) { in ext_quic_transport_params_parse_serverhello() argument
2649 hs, out_alert, contents, /*used_legacy_codepoint=*/false); in ext_quic_transport_params_parse_serverhello()
2653 SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents) { in ext_quic_transport_params_parse_serverhello_legacy() argument
2655 hs, out_alert, contents, /*used_legacy_codepoint=*/true); in ext_quic_transport_params_parse_serverhello_legacy()
2659 SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents, in ext_quic_transport_params_parse_clienthello_impl() argument
2662 if (!contents) { in ext_quic_transport_params_parse_clienthello_impl()
2696 return ssl->s3->peer_quic_transport_params.CopyFrom(*contents); in ext_quic_transport_params_parse_clienthello_impl()
2701 CBS *contents) { in ext_quic_transport_params_parse_clienthello() argument
2703 hs, out_alert, contents, /*used_legacy_codepoint=*/false); in ext_quic_transport_params_parse_clienthello()
2707 SSL_HANDSHAKE *hs, uint8_t *out_alert, CBS *contents) { in ext_quic_transport_params_parse_clienthello_legacy() argument
2709 hs, out_alert, contents, /*used_legacy_codepoint=*/true); in ext_quic_transport_params_parse_clienthello_legacy()
2735 CBB contents; in ext_quic_transport_params_add_serverhello_impl() local
2737 !CBB_add_u16_length_prefixed(out, &contents) || in ext_quic_transport_params_add_serverhello_impl()
2738 !CBB_add_bytes(&contents, hs->config->quic_transport_params.data(), in ext_quic_transport_params_add_serverhello_impl()
2771 CBS *contents) { in ext_delegated_credential_parse_clienthello() argument
2772 if (contents == nullptr || ssl_protocol_version(hs->ssl) < TLS1_3_VERSION) { in ext_delegated_credential_parse_clienthello()
2778 // The contents of the extension are the signature algorithms the client will in ext_delegated_credential_parse_clienthello()
2781 if (!CBS_get_u16_length_prefixed(contents, &sigalg_list) || in ext_delegated_credential_parse_clienthello()
2783 CBS_len(contents) != 0 || in ext_delegated_credential_parse_clienthello()
2797 CBB contents, algs; in cert_compression_add_clienthello() local
2806 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in cert_compression_add_clienthello()
2807 !CBB_add_u8_length_prefixed(&contents, &algs))) { in cert_compression_add_clienthello()
2821 CBS *contents) { in cert_compression_parse_serverhello() argument
2822 if (contents == nullptr) { in cert_compression_parse_serverhello()
2833 CBS *contents) { in cert_compression_parse_clienthello() argument
2834 if (contents == nullptr) { in cert_compression_parse_clienthello()
2842 if (!CBS_get_u8_length_prefixed(contents, &alg_ids) || in cert_compression_parse_clienthello()
2843 CBS_len(contents) != 0 || in cert_compression_parse_clienthello()
2940 CBB contents, proto_list, proto; in ext_alps_add_clienthello_impl() local
2942 !CBB_add_u16_length_prefixed(out_compressible, &contents) || in ext_alps_add_clienthello_impl()
2943 !CBB_add_u16_length_prefixed(&contents, &proto_list)) { in ext_alps_add_clienthello_impl()
2974 CBS *contents, in ext_alps_parse_serverhello_impl() argument
2977 if (contents == nullptr) { in ext_alps_parse_serverhello_impl()
2995 if (!hs->new_session->peer_application_settings.CopyFrom(*contents)) { in ext_alps_parse_serverhello_impl()
3006 CBS *contents) { in ext_alps_parse_serverhello() argument
3007 return ext_alps_parse_serverhello_impl(hs, out_alert, contents, in ext_alps_parse_serverhello()
3013 CBS *contents) { in ext_alps_parse_serverhello_old() argument
3014 return ext_alps_parse_serverhello_impl(hs, out_alert, contents, in ext_alps_parse_serverhello_old()
3039 CBB contents; in ext_alps_add_serverhello_impl() local
3041 !CBB_add_u16_length_prefixed(out, &contents) || in ext_alps_add_serverhello_impl()
3042 !CBB_add_bytes(&contents, in ext_alps_add_serverhello_impl()
3662 CBS *contents = NULL, fake_contents; in ssl_scan_clienthello_tlsext() local
3671 contents = &fake_contents; in ssl_scan_clienthello_tlsext()
3678 if (!kExtensions[i].parse_clienthello(hs, &alert, contents)) { in ssl_scan_clienthello_tlsext()
4339 bool ssl_is_sct_list_valid(const CBS *contents) { in ssl_is_sct_list_valid() argument
4343 CBS copy = *contents; in ssl_is_sct_list_valid()