fixed IDENTITY
This commit is contained in:
parent
0d6dbbae93
commit
d203d6dbff
@ -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");
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
BIN
trial4/out/main
BIN
trial4/out/main
Binary file not shown.
Loading…
Reference in New Issue
Block a user