mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 11:35:38 +01:00
Fix hash buffer size in pkey programs
This commit is contained in:
parent
d224ff1f63
commit
102a620c9a
@ -75,7 +75,7 @@ int main( void )
|
||||
|
||||
unsigned char *p, *end;
|
||||
unsigned char buf[2048];
|
||||
unsigned char hash[20];
|
||||
unsigned char hash[32];
|
||||
const char *pers = "dh_client";
|
||||
|
||||
mbedtls_entropy_context entropy;
|
||||
|
@ -74,7 +74,7 @@ int main( void )
|
||||
mbedtls_net_context listen_fd, client_fd;
|
||||
|
||||
unsigned char buf[2048];
|
||||
unsigned char hash[20];
|
||||
unsigned char hash[32];
|
||||
unsigned char buf2[2];
|
||||
const char *pers = "dh_server";
|
||||
|
||||
|
@ -64,7 +64,7 @@ int main( int argc, char *argv[] )
|
||||
mbedtls_pk_context pk;
|
||||
mbedtls_entropy_context entropy;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
unsigned char hash[20];
|
||||
unsigned char hash[32];
|
||||
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
|
||||
char filename[512];
|
||||
const char *pers = "mbedtls_pk_sign";
|
||||
|
@ -59,7 +59,7 @@ int main( int argc, char *argv[] )
|
||||
int ret = 1;
|
||||
size_t i;
|
||||
mbedtls_pk_context pk;
|
||||
unsigned char hash[20];
|
||||
unsigned char hash[32];
|
||||
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
|
||||
char filename[512];
|
||||
|
||||
|
@ -59,7 +59,7 @@ int main( int argc, char *argv[] )
|
||||
int ret;
|
||||
size_t i;
|
||||
mbedtls_rsa_context rsa;
|
||||
unsigned char hash[20];
|
||||
unsigned char hash[32];
|
||||
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
|
||||
char filename[512];
|
||||
|
||||
|
@ -65,7 +65,7 @@ int main( int argc, char *argv[] )
|
||||
mbedtls_pk_context pk;
|
||||
mbedtls_entropy_context entropy;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
unsigned char hash[20];
|
||||
unsigned char hash[32];
|
||||
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
|
||||
char filename[512];
|
||||
const char *pers = "rsa_sign_pss";
|
||||
|
@ -58,7 +58,7 @@ int main( int argc, char *argv[] )
|
||||
int ret, c;
|
||||
size_t i;
|
||||
mbedtls_rsa_context rsa;
|
||||
unsigned char hash[20];
|
||||
unsigned char hash[32];
|
||||
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
|
||||
char filename[512];
|
||||
|
||||
|
@ -63,7 +63,7 @@ int main( int argc, char *argv[] )
|
||||
int ret = 1;
|
||||
size_t i;
|
||||
mbedtls_pk_context pk;
|
||||
unsigned char hash[20];
|
||||
unsigned char hash[32];
|
||||
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
|
||||
char filename[512];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user