Lines Matching refs:offset_s

596 	off_t offset_s = TPM_HEADER_SIZE, offset_p;  in tpm_buf_fill_hmac_session()  local
625 u32 handle = tpm_buf_read_u32(buf, &offset_s); in tpm_buf_fill_hmac_session()
634 val = tpm_buf_read_u32(buf, &offset_s); in tpm_buf_fill_hmac_session()
636 offset_p = offset_s + val; in tpm_buf_fill_hmac_session()
637 for (i = 1; offset_s < offset_p; i++) { in tpm_buf_fill_hmac_session()
638 u32 handle = tpm_buf_read_u32(buf, &offset_s); in tpm_buf_fill_hmac_session()
643 len = tpm_buf_read_u16(buf, &offset_s); in tpm_buf_fill_hmac_session()
644 offset_s += len; in tpm_buf_fill_hmac_session()
646 a = tpm_buf_read_u8(buf, &offset_s); in tpm_buf_fill_hmac_session()
648 len = tpm_buf_read_u16(buf, &offset_s); in tpm_buf_fill_hmac_session()
650 hmac = &buf->data[offset_s]; in tpm_buf_fill_hmac_session()
658 offset_s += len; in tpm_buf_fill_hmac_session()
660 if (offset_s != offset_p) { in tpm_buf_fill_hmac_session()
706 if (offset_s != tpm_buf_length(buf)) in tpm_buf_fill_hmac_session()
707 sha256_update(&sctx, &buf->data[offset_s], in tpm_buf_fill_hmac_session()
708 tpm_buf_length(buf) - offset_s); in tpm_buf_fill_hmac_session()
755 off_t offset_s, offset_p; in tpm_buf_check_hmac_response() local
789 offset_s = TPM_HEADER_SIZE + handles * 4; in tpm_buf_check_hmac_response()
790 parm_len = tpm_buf_read_u32(buf, &offset_s); in tpm_buf_check_hmac_response()
791 offset_p = offset_s; in tpm_buf_check_hmac_response()
792 offset_s += parm_len; in tpm_buf_check_hmac_response()
795 len = tpm_buf_read_u16(buf, &offset_s); in tpm_buf_check_hmac_response()
796 offset_s += len + 1; in tpm_buf_check_hmac_response()
797 len = tpm_buf_read_u16(buf, &offset_s); in tpm_buf_check_hmac_response()
798 offset_s += len; in tpm_buf_check_hmac_response()
801 len = tpm_buf_read_u16(buf, &offset_s); in tpm_buf_check_hmac_response()
802 if (offset_s + len > tpm_buf_length(buf)) in tpm_buf_check_hmac_response()
806 memcpy(auth->tpm_nonce, &buf->data[offset_s], len); in tpm_buf_check_hmac_response()
807 offset_s += len; in tpm_buf_check_hmac_response()
808 attrs = tpm_buf_read_u8(buf, &offset_s); in tpm_buf_check_hmac_response()
809 len = tpm_buf_read_u16(buf, &offset_s); in tpm_buf_check_hmac_response()
810 if (offset_s + len != tpm_buf_length(buf)) in tpm_buf_check_hmac_response()
837 if (memcmp(rphash, &buf->data[offset_s], SHA256_DIGEST_SIZE) == 0) { in tpm_buf_check_hmac_response()