Lines Matching refs:data

68                     const unsigned char *data,
131 PSA_CHK(psa_hash_update(&operation, data, min_data_len));
149 PSA_CHK(psa_hash_update(&operation, data + offset, 1));
188 const unsigned char *data,
235 MD_CHK(mbedtls_md_update(ctx, data, min_data_len));
252 MD_CHK(mbedtls_md_update(ctx, data + offset, 1));
355 * sure we don't leak any plaintext data. */
642 * size of the additional data structure is calculated as:
691 * Moreover, the additional data involves the length of the TLS
706 * RFC 9146 uses a common pattern when constructing the data
712 * data = seq_num_placeholder +
726 * data = seq_num_placeholder +
739 * AEAD ciphers use the following additional data calculation (with CIDs):
752 * defines the additional data calculation as follows:
909 unsigned char *data;
910 /* For an explanation of the additional data length see
955 data = rec->buf + rec->data_offset;
958 data, rec->data_len);
985 if (ssl_build_inner_plaintext(data,
1016 if (ssl_build_inner_plaintext(data,
1065 status = psa_mac_update(&operation, data, rec->data_len);
1081 ret = mbedtls_md_hmac_update(&transform->md_ctx_enc, data, rec->data_len);
1095 memcpy(data + rec->data_len, mac, transform->maclen);
1098 MBEDTLS_SSL_DEBUG_BUF(4, "computed mac", data + rec->data_len,
1175 * Build additional data for AEAD encryption.
1187 MBEDTLS_SSL_DEBUG_BUF(4, "additional data used for AEAD",
1201 data, rec->data_len,
1202 data, rec->buf_len - (data - rec->buf),
1214 data, rec->data_len, /* src */
1215 data, rec->buf_len - (size_t) (data - rec->buf), /* dst */
1224 data + rec->data_len - transform->taglen,
1238 memcpy(data - dynamic_iv_len, dynamic_iv, dynamic_iv_len);
1272 data[rec->data_len + i] = (unsigned char) padlen;
1301 memcpy(data - transform->ivlen, transform->iv_enc, transform->ivlen);
1331 data, rec->data_len,
1332 data, rec->data_len, &olen);
1342 data + olen, rec->data_len - olen,
1357 data, rec->data_len,
1358 data, &olen)) != 0) {
1369 data -= transform->ivlen;
1394 MBEDTLS_SSL_DEBUG_BUF(4, "MAC'd meta-data", add_data,
1408 status = psa_mac_update(&operation, data, rec->data_len);
1426 data, rec->data_len);
1440 memcpy(data + rec->data_len, mac, transform->maclen);
1494 unsigned char *data;
1495 /* For an explanation of the additional data length see
1519 data = rec->buf + rec->data_offset;
1572 dynamic_iv = data;
1574 data += dynamic_iv_len;
1601 * Build additional data for AEAD encryption.
1607 MBEDTLS_SSL_DEBUG_BUF(4, "additional data used for AEAD",
1611 * explicit_iv_len Bytes preceding data, and taglen
1612 * bytes following data + data_len. This justifies
1617 MBEDTLS_SSL_DEBUG_BUF(4, "TAG used", data + rec->data_len,
1628 data, rec->data_len + transform->taglen,
1629 data, rec->buf_len - (data - rec->buf),
1642 data, rec->data_len + transform->taglen, /* src */
1643 data, rec->buf_len - (size_t) (data - rec->buf), &olen, /* dst */
1733 * Afterwards, we know that data + data_len is followed by at
1744 MBEDTLS_SSL_DEBUG_BUF(4, "MAC'd meta-data", add_data,
1758 status = psa_mac_update(&operation, data, rec->data_len);
1764 status = psa_mac_verify_finish(&operation, data + rec->data_len,
1776 data, rec->data_len);
1789 MBEDTLS_SSL_DEBUG_BUF(4, "message mac", data + rec->data_len,
1795 if (mbedtls_ct_memcmp(data + rec->data_len, mac_expect,
1842 memcpy(transform->iv_dec, data, transform->ivlen);
1844 data += transform->ivlen;
1870 data, rec->data_len,
1871 data, rec->data_len, &olen);
1880 data + olen, rec->data_len - olen,
1894 data, rec->data_len, data, &olen)) != 0) {
1910 padlen = data[rec->data_len - 1];
1949 volatile unsigned char * const check = data;
1993 data, rec->data_len);
2044 data, rec->data_len, min_len, max_len,
2049 data, rec->data_len, min_len, max_len,
2057 mbedtls_ct_memcpy_offset(mac_peer, data,
2102 ret = ssl_parse_inner_plaintext(data, &rec->data_len,
2113 ret = ssl_parse_inner_plaintext(data, &rec->data_len,
2131 * Fill the input message buffer by appending data to it.
2132 * The amount of data already fetched is in ssl->in_left.
2163 MBEDTLS_SSL_DEBUG_MSG(1, ("requesting more data than fits"));
2173 * sometimes read more then requested, and handle the additional data.
2206 * Done if we already have enough data.
2346 * Flush any data not yet written
2360 /* Avoid incrementing counter if data is flushed */
3990 * Although the server rejected early data, it might receive early
3991 * data as long as it has not received the client Finished message.
3996 * server then skips past early data by attempting to deprotect
4007 3, ("EarlyData: deprotect and discard app data records."));
4036 * deprotect because it has rejected early data, as we have just
4073 /* TLS v1.2 explicitly disallows zero-length messages which are not application data */
4122 * Although the server rejected early data because it needed to send an
4123 * HelloRetryRequest message, it might receive early data as long as it has
4125 * The early data is encrypted with early keys and should be ignored as
4128 * "The server then ignores early data by skipping all records with an
4131 * data message before 2nd ClientHello when early_data was received in 1st
4333 size_t msg_len = MBEDTLS_GET_UINT24_BE(hs_buf->data, 1);
4344 hs_buf->data, msg_len + 12);
4349 memcpy(ssl->in_msg, hs_buf->data, ssl->in_hslen);
4537 hs_buf->data = mbedtls_calloc(1, reassembly_buf_sz);
4538 if (hs_buf->data == NULL) {
4546 memcpy(hs_buf->data, ssl->in_msg, 6);
4547 memset(hs_buf->data + 6, 0, 3);
4548 memcpy(hs_buf->data + 9, hs_buf->data + 1, 3);
4555 if (memcmp(hs_buf->data, ssl->in_msg, 4) != 0) {
4564 unsigned char * const msg = hs_buf->data + 12;
4626 * (4) Application data:
4628 * the application data as a stream transport
4635 /* Hard assertion to be sure that no application data
4677 /* Case (4): Application data */
4708 if (hs->buffering.future_record.data != NULL) {
4712 mbedtls_free(hs->buffering.future_record.data);
4713 hs->buffering.future_record.data = NULL;
4737 rec = hs->buffering.future_record.data;
4795 if (hs->buffering.future_record.data != NULL) {
4821 hs->buffering.future_record.data =
4823 if (hs->buffering.future_record.data == NULL) {
4829 memcpy(hs->buffering.future_record.data, rec->buf, rec->buf_len);
5230 * data.
5232 MBEDTLS_SSL_DEBUG_MSG(3, ("switching to new transform spec for inbound data"));
5427 * Case D: An application data message is being processed
5430 MBEDTLS_SSL_DEBUG_MSG(3, ("ssl_check_pending: application data record is being processed"));
5730 * brief Read at most 'len' application data bytes from the input
5734 * - First byte of application data not read yet in the input
5736 * - The number of bytes of data not read yet is `in_msglen`.
5737 * param buf buffer that will hold the data
5755 /* Zeroising the plaintext buffer to erase unused application data
5764 /* more data available */
5772 * Receive application data decrypted from the SSL layer
5829 /* Loop as long as no application data record is available */
5875 * an application data record while awaiting the ServerHello.
5877 * a non-handshake, non-application data message while awaiting
5882 * if it's application data.
5883 * - For 2), the loop condition isn't satisfied as application data
5911 MBEDTLS_SSL_DEBUG_MSG(1, ("bad application data message"));
5956 * The server may receive early data only while waiting for the End of
5969 * Send application data to be encrypted by the SSL layer, taking care of max
5974 * Zero-length fragments of Application data MAY be sent as they are
6007 * The user has previously tried to send the data and
6019 * copy the data into the internal buffers and setup the data structure
6038 * Write application data (public-facing wrapper)
6100 * If we are at the beginning of the handshake, the early data state being
6103 * enough to be able to send early data if possible. That way, we can
6105 * send at least one record of early data. Note that when the state is
6107 * MBEDTLS_SSL_EARLY_DATA_STATE_CAN_WRITE, we cannot send early data
6108 * as the early data outbound transform has not been set as we may have to
6130 * If we are past the point where we can send early data or we have
6131 * already reached the maximum early data size, return immediatly.
6133 * it too much. If we reach a point where we can still send early data,
6274 mbedtls_zeroize_and_free(hs_buf->data, hs_buf->data_len);