mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:35:38 +01:00
Merge remote-tracking branch 'upstream-public/pr/1142' into development-proposed
This commit is contained in:
commit
b9e8696d56
@ -37,6 +37,8 @@ Bugfix
|
|||||||
ECPrivateKey structure. Found by jethrogb, fixed in #1379.
|
ECPrivateKey structure. Found by jethrogb, fixed in #1379.
|
||||||
* Return plaintext data sooner on unpadded CBC decryption, as stated in
|
* Return plaintext data sooner on unpadded CBC decryption, as stated in
|
||||||
the mbedtls_cipher_update() documentation. Contributed by Andy Leiserson.
|
the mbedtls_cipher_update() documentation. Contributed by Andy Leiserson.
|
||||||
|
* Fix overriding and ignoring return values when parsing and writing to
|
||||||
|
a file in pk_sign program. Found by kevlut in #1142.
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* Remove some redundant code in bignum.c. Contributed by Alexey Skalozub.
|
* Remove some redundant code in bignum.c. Contributed by Alexey Skalozub.
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#define mbedtls_snprintf snprintf
|
#define mbedtls_snprintf snprintf
|
||||||
#define mbedtls_printf printf
|
#define mbedtls_printf printf
|
||||||
#endif
|
#endif
|
||||||
@ -100,8 +101,7 @@ int main( int argc, char *argv[] )
|
|||||||
|
|
||||||
if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 )
|
if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 )
|
||||||
{
|
{
|
||||||
ret = 1;
|
mbedtls_printf( " failed\n ! Could not parse '%s'\n", argv[1] );
|
||||||
mbedtls_printf( " failed\n ! Could not open '%s'\n", argv[1] );
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,6 +141,7 @@ int main( int argc, char *argv[] )
|
|||||||
|
|
||||||
if( fwrite( buf, 1, olen, f ) != olen )
|
if( fwrite( buf, 1, olen, f ) != olen )
|
||||||
{
|
{
|
||||||
|
ret = 1;
|
||||||
mbedtls_printf( "failed\n ! fwrite failed\n\n" );
|
mbedtls_printf( "failed\n ! fwrite failed\n\n" );
|
||||||
fclose( f );
|
fclose( f );
|
||||||
goto exit;
|
goto exit;
|
||||||
@ -168,7 +169,7 @@ exit:
|
|||||||
fflush( stdout ); getchar();
|
fflush( stdout ); getchar();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return( ret );
|
return( ret ? EXIT_FAILURE : EXIT_SUCCESS );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C &&
|
#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C &&
|
||||||
MBEDTLS_SHA256_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO &&
|
MBEDTLS_SHA256_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO &&
|
||||||
|
Loading…
Reference in New Issue
Block a user