fixed IDENTITY

This commit is contained in:
atul.jha 2021-01-13 12:31:43 +01:00
parent 0d6dbbae93
commit d203d6dbff
4 changed files with 4 additions and 4 deletions

View File

@ -320,8 +320,7 @@ DIMASTATUS WritePrivKey(KeyDrv_context * KD_ctx, mbedtls_pk_context * pkey_ctx)
unsigned char dest_file[50];
unsigned char * outbuf = calloc(1,sizeof(unsigned char)*KEY_BUF_SIZE);
if(strcmp(KD_ctx -> phrase, IDENTITY))
if(strcmp(KD_ctx -> phrase, IDENTITY) == 0)
{
if(DEBUG)
{
@ -340,7 +339,7 @@ DIMASTATUS WritePrivKey(KeyDrv_context * KD_ctx, mbedtls_pk_context * pkey_ctx)
strcpy(dest_file,"keys/");
}
printf("%s,%s\n",KD_ctx->phrase,IDENTITY );
strcat(dest_file, KD_ctx->phrase);
strcat(dest_file, "_priv");

View File

@ -33,6 +33,7 @@ DIMASTATUS ROMprotocol()
//Calculate DIMA RTM hash
//////////////TODO////////////////
//this should be calculated on the DIMA bin and remain static.
//how to do that?
//hardcoding junk value for now

View File

@ -15,7 +15,7 @@ all: main.c ROMprotocol.c KeyGen.c
${CC} -o $(ODIR)/main main.c KeyGen.c ROMprotocol.c -lm -lmbedcrypto -lmbedtls -lmbedx509
debug:
${CC} -g -o $(ODIR)/dbg-main main.c KeyGen.c ROMprotocol.c-lm -lmbedcrypto -lmbedtls -lmbedx509
${CC} -gdwarf-2 -g3 -o $(ODIR)/dbg-main main.c KeyGen.c ROMprotocol.c -lm -lmbedcrypto -lmbedtls -lmbedx509
trial:
${CC} -g -o $(ODIR)/trial ECCtrial.c -lm -lmbedcrypto -lmbedtls -lmbedx509

Binary file not shown.