mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Fix FALLBACK_SCSV parsing
Fixed a bug in ssl_srv.c when parsing TLS_FALLBACK_SCSV in the ciphersuite list that caused it to miss it sometimes. Reported by Hugo Leisink as issue #810. Fix initially by @andreasag01; this commit isolates the bug fix and adds a non-regression test.
This commit is contained in:
parent
b65c2be5f1
commit
d50177fdf3
4 changed files with 126 additions and 1 deletions
|
|
@ -1700,7 +1700,7 @@ read_record_header:
|
|||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_FALLBACK_SCSV)
|
||||
for( i = 0, p = buf + 41 + sess_len; i < ciph_len; i += 2, p += 2 )
|
||||
for( i = 0, p = buf + ciph_offset + 2; i < ciph_len; i += 2, p += 2 )
|
||||
{
|
||||
if( p[0] == (unsigned char)( ( MBEDTLS_SSL_FALLBACK_SCSV_VALUE >> 8 ) & 0xff ) &&
|
||||
p[1] == (unsigned char)( ( MBEDTLS_SSL_FALLBACK_SCSV_VALUE ) & 0xff ) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue