mbedtls_ssl_check_record() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...
SummarySyntaxArgumentsRelatedReferencesCall TreeData Use

Return value

\c 0 if the record is valid and authentic and has not been seen before. MBEDTLS_ERR_SSL_INVALID_MAC if the check completed successfully but the record was found to be not authentic. MBEDTLS_ERR_SSL_INVALID_RECORD if the check completed successfully but the record was found to be invalid for a reason different from authenticity checking. MBEDTLS_ERR_SSL_UNEXPECTED_RECORD if the check completed successfully but the record was found to be unexpected in the state of the SSL context, including replayed records. Another negative error code on different kinds of failure. In this case, the SSL context becomes unusable and needs to be freed or reset before reuse.

Notes

This routine only checks whether the provided buffer begins with a valid and authentic record that has not been seen before, but does not check potential data following the initial record. In particular, it is possible to pass DTLS datagrams containing multiple records, in which case only the first record is checked. This function modifies the input buffer \p buf. If you need to preserve the original record, you have to maintain a copy.

References