mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-20 22:05:15 +00:00
Rename mbedtls_platform_memcmp() to mbedtls_platform_memequal()
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
This commit is contained in:
parent
c6319a70ab
commit
e3c4ee51b2
21 changed files with 61 additions and 61 deletions
|
|
@ -130,11 +130,11 @@
|
|||
*/
|
||||
#define MBEDTLS_OID_CMP(oid_str, oid_buf) \
|
||||
( ( MBEDTLS_OID_SIZE(oid_str) != (oid_buf)->len ) || \
|
||||
mbedtls_platform_memcmp( (oid_str), (oid_buf)->p, (oid_buf)->len) != 0 )
|
||||
mbedtls_platform_memequal( (oid_str), (oid_buf)->p, (oid_buf)->len) != 0 )
|
||||
|
||||
#define MBEDTLS_OID_CMP_RAW(oid_str, oid_buf, oid_buf_len) \
|
||||
( ( MBEDTLS_OID_SIZE(oid_str) != (oid_buf_len) ) || \
|
||||
mbedtls_platform_memcmp( (oid_str), (oid_buf), (oid_buf_len) ) != 0 )
|
||||
mbedtls_platform_memequal( (oid_str), (oid_buf), (oid_buf_len) ) != 0 )
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -2231,7 +2231,7 @@
|
|||
#define rsa_rsassa_pss_verify_ext mbedtls_rsa_rsassa_pss_verify_ext
|
||||
#define rsa_self_test mbedtls_rsa_self_test
|
||||
#define rsa_set_padding mbedtls_rsa_set_padding
|
||||
#define safer_memcmp mbedtls_platform_memcmp
|
||||
#define safer_memcmp mbedtls_platform_memequal
|
||||
#define set_alarm mbedtls_set_alarm
|
||||
#define sha1 mbedtls_sha1
|
||||
#define sha1_context mbedtls_sha1_context
|
||||
|
|
|
|||
|
|
@ -215,12 +215,12 @@ void *mbedtls_platform_memcpy( void *dst, const void *src, size_t num );
|
|||
int mbedtls_platform_memmove( void *dst, const void *src, size_t num );
|
||||
|
||||
/**
|
||||
* \brief Secure memcmp
|
||||
* \brief Secure check if the buffers have the same data.
|
||||
*
|
||||
* This is a constant-time version of memcmp(). If
|
||||
* MBEDTLS_ENTROPY_HARDWARE_ALT is defined, the order is also
|
||||
* randomised using the hardware RNG in order to further harden
|
||||
* against side-channel attacks.
|
||||
* This is a constant-time version of memcmp(), but without checking
|
||||
* if the bytes are greater or lower. If MBEDTLS_ENTROPY_HARDWARE_ALT
|
||||
* is defined, the order is also randomised using the hardware RNG in
|
||||
* order to further harden against side-channel attacks.
|
||||
*
|
||||
* \param buf1 First buffer to compare.
|
||||
* \param buf2 Second buffer to compare against.
|
||||
|
|
@ -229,7 +229,7 @@ int mbedtls_platform_memmove( void *dst, const void *src, size_t num );
|
|||
* \return 0 if the buffers were equal or an unspecified non-zero value
|
||||
* otherwise.
|
||||
*/
|
||||
int mbedtls_platform_memcmp( const void *buf1, const void *buf2, size_t num );
|
||||
int mbedtls_platform_memequal( const void *buf1, const void *buf2, size_t num );
|
||||
|
||||
/**
|
||||
* \brief RNG-function for getting a random 32-bit integer.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue