mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-24 20:41:05 +00:00
crypt_and_hash: check MAC earlier
This commit is contained in:
parent
7ab2d5daf5
commit
b9f6d507dd
|
@ -7,6 +7,7 @@ Changes
|
||||||
Bugfix
|
Bugfix
|
||||||
* Fixed X.509 hostname comparison (with non-regular characters)
|
* Fixed X.509 hostname comparison (with non-regular characters)
|
||||||
* SSL now gracefully handles missing RNG
|
* SSL now gracefully handles missing RNG
|
||||||
|
* crypt_and_hash app checks MAC before final decryption
|
||||||
|
|
||||||
= Version 1.2.10 released 2013-10-07
|
= Version 1.2.10 released 2013-10-07
|
||||||
Changes
|
Changes
|
||||||
|
|
|
@ -453,17 +453,6 @@ int main( int argc, char *argv[] )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Write the final block of data
|
|
||||||
*/
|
|
||||||
cipher_finish( &cipher_ctx, output, &olen );
|
|
||||||
|
|
||||||
if( fwrite( output, 1, olen, fout ) != olen )
|
|
||||||
{
|
|
||||||
fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen );
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Verify the message authentication code.
|
* Verify the message authentication code.
|
||||||
*/
|
*/
|
||||||
|
@ -486,6 +475,17 @@ int main( int argc, char *argv[] )
|
||||||
"or file corrupted.\n" );
|
"or file corrupted.\n" );
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write the final block of data
|
||||||
|
*/
|
||||||
|
cipher_finish( &cipher_ctx, output, &olen );
|
||||||
|
|
||||||
|
if( fwrite( output, 1, olen, fout ) != olen )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen );
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
Loading…
Reference in a new issue