mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Use functions in alignment.h to get value
Refactor code using get functions from alignment.h to read values. Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
@ -364,10 +364,7 @@ int mbedtls_ssl_cookie_check(void *p_ctx,
|
||||
cur_time = ctx->serial;
|
||||
#endif
|
||||
|
||||
cookie_time = ((unsigned long) cookie[0] << 24) |
|
||||
((unsigned long) cookie[1] << 16) |
|
||||
((unsigned long) cookie[2] << 8) |
|
||||
((unsigned long) cookie[3]);
|
||||
cookie_time = (unsigned long) MBEDTLS_GET_UINT32_BE(cookie, 0);
|
||||
|
||||
if (ctx->timeout != 0 && cur_time - cookie_time > ctx->timeout) {
|
||||
ret = -1;
|
||||
|
Reference in New Issue
Block a user