mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
Fix SSLv3 handling of SHA-384 suites
Fixes memory corruption, introduced in
a5bdfcd (Relax some SHA2 ciphersuite's version requirements)
This commit is contained in:
parent
e1b665e1aa
commit
c72ac7c3ef
2 changed files with 4 additions and 2 deletions
|
|
@ -941,6 +941,8 @@ static void ssl_mac( md_context_t *md_ctx, unsigned char *secret,
|
|||
padlen = 40;
|
||||
else if( md_type == POLARSSL_MD_SHA256 )
|
||||
padlen = 32;
|
||||
else if( md_type == POLARSSL_MD_SHA384 )
|
||||
padlen = 16;
|
||||
|
||||
memcpy( header, ctr, 8 );
|
||||
header[ 8] = (unsigned char) type;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue