mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-24 00:01:21 +00:00
Timing: fix mbedtls_set_alarm(0) on Unix/POSIX
The POSIX/Unix implementation of mbedtls_set_alarm did not set the mbedtls_timing_alarmed flag when called with 0, which was inconsistent with what the documentation implied and with the Windows behavior.
This commit is contained in:
parent
86bc448e75
commit
3099b43c6b
|
@ -12,6 +12,9 @@ Security
|
||||||
was independently reported by Tim Nordell via e-mail and by Florin Petriuc
|
was independently reported by Tim Nordell via e-mail and by Florin Petriuc
|
||||||
and sjorsdewit on GitHub. Fix proposed by Florin Petriuc in #1022. Fixes #707.
|
and sjorsdewit on GitHub. Fix proposed by Florin Petriuc in #1022. Fixes #707.
|
||||||
|
|
||||||
|
Features
|
||||||
|
* Allow comments in test data files.
|
||||||
|
|
||||||
Bugfix
|
Bugfix
|
||||||
* Fix ssl_parse_record_header() to silently discard invalid DTLS records
|
* Fix ssl_parse_record_header() to silently discard invalid DTLS records
|
||||||
as recommended in RFC 6347 Section 4.1.2.7.
|
as recommended in RFC 6347 Section 4.1.2.7.
|
||||||
|
@ -50,15 +53,13 @@ Bugfix
|
||||||
* Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64.
|
* Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64.
|
||||||
* Fix crash when calling mbedtls_ssl_cache_free() twice. Found by
|
* Fix crash when calling mbedtls_ssl_cache_free() twice. Found by
|
||||||
MilenkoMitrovic, #1104
|
MilenkoMitrovic, #1104
|
||||||
|
* Fix mbedtls_timing_alarm(0) on Unix.
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* Extend cert_write example program by options to set the CRT version
|
* Extend cert_write example program by options to set the CRT version
|
||||||
and the message digest. Further, allow enabling/disabling of authority
|
and the message digest. Further, allow enabling/disabling of authority
|
||||||
identifier, subject identifier and basic constraints extensions.
|
identifier, subject identifier and basic constraints extensions.
|
||||||
|
|
||||||
Features
|
|
||||||
* Allow comments in test data files.
|
|
||||||
|
|
||||||
= mbed TLS 2.1.9 branch released 2017-08-10
|
= mbed TLS 2.1.9 branch released 2017-08-10
|
||||||
|
|
||||||
Security
|
Security
|
||||||
|
|
|
@ -310,6 +310,12 @@ void mbedtls_set_alarm( int seconds )
|
||||||
mbedtls_timing_alarmed = 0;
|
mbedtls_timing_alarmed = 0;
|
||||||
signal( SIGALRM, sighandler );
|
signal( SIGALRM, sighandler );
|
||||||
alarm( seconds );
|
alarm( seconds );
|
||||||
|
if( seconds == 0 )
|
||||||
|
{
|
||||||
|
/* alarm(0) cancelled any previous pending alarm, but the
|
||||||
|
handler won't fire, so raise the flag straight away. */
|
||||||
|
mbedtls_timing_alarmed = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _WIN32 && !EFIX64 && !EFI32 */
|
#endif /* _WIN32 && !EFIX64 && !EFI32 */
|
||||||
|
|
Loading…
Reference in a new issue