Fix hash buffer size in pkey programs

backport from 102a620
This commit is contained in:
Manuel Pégourié-Gonnard 2015-08-31 11:32:03 +02:00
parent 6432c7e782
commit ee7db9cb6d
8 changed files with 8 additions and 8 deletions

View file

@ -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";
entropy_context entropy;

View file

@ -75,7 +75,7 @@ int main( void )
int client_fd = -1;
unsigned char buf[2048];
unsigned char hash[20];
unsigned char hash[32];
unsigned char buf2[2];
const char *pers = "dh_server";

View file

@ -74,7 +74,7 @@ int main( int argc, char *argv[] )
pk_context pk;
entropy_context entropy;
ctr_drbg_context ctr_drbg;
unsigned char hash[20];
unsigned char hash[32];
unsigned char buf[POLARSSL_MPI_MAX_SIZE];
char filename[512];
const char *pers = "pk_sign";

View file

@ -68,7 +68,7 @@ int main( int argc, char *argv[] )
int ret = 1;
size_t i;
pk_context pk;
unsigned char hash[20];
unsigned char hash[32];
unsigned char buf[POLARSSL_MPI_MAX_SIZE];
char filename[512];

View file

@ -58,7 +58,7 @@ int main( int argc, char *argv[] )
int ret;
size_t i;
rsa_context rsa;
unsigned char hash[20];
unsigned char hash[32];
unsigned char buf[POLARSSL_MPI_MAX_SIZE];
char filename[512];

View file

@ -74,7 +74,7 @@ int main( int argc, char *argv[] )
pk_context pk;
entropy_context entropy;
ctr_drbg_context ctr_drbg;
unsigned char hash[20];
unsigned char hash[32];
unsigned char buf[POLARSSL_MPI_MAX_SIZE];
char filename[512];
const char *pers = "rsa_sign_pss";

View file

@ -57,7 +57,7 @@ int main( int argc, char *argv[] )
int ret, c;
size_t i;
rsa_context rsa;
unsigned char hash[20];
unsigned char hash[32];
unsigned char buf[POLARSSL_MPI_MAX_SIZE];
char filename[512];

View file

@ -69,7 +69,7 @@ int main( int argc, char *argv[] )
int ret = 1;
size_t i;
pk_context pk;
unsigned char hash[20];
unsigned char hash[32];
unsigned char buf[POLARSSL_MPI_MAX_SIZE];
char filename[512];