tools/header_generation/create_hdr_esbc/taal_api/esbc_hdr_ta_3_x.c
/****************************************************************************
 * API's for Calculating SRK Hash
 ****************************************************************************/
API's for Calculating SRK Hash
API ' s for Calculating SRK Hash
static int calc_srk_hash_ta_3_x(uint32_t max_keys)
{
	int ret;
	if (gd.iek_flag == 1) {
		printf("\nSRK/Public Key Hash not calculated.. IE = 1");
		if (gd.num_pri_key > 1) {
			printf("Error !! IE=1, Only 1 Private Key required\n");
			return FAILURE;
		}
		gd.srk_hash_flag = 0;
		gd.srk_flag = 0;
		gd.srk_sel = 1;
		ret = crypto_extract_pub_key(gd.pub_fname[0],
					&gd.key_len,
					gd.key_table[0].pkey);
		return ret;
	}
	gd.srk_flag = 1;
	return (create_srk_calc_hash(max_keys));
}
static int calc_srk_hash_ta_3_x ( uint32_t max_keys ) { int ret ; if ( gd . iek_flag == 1 ) { printf ( " \n " ) ; if ( gd . num_pri_key > 1 ) { printf ( " \n " ) ; return FAILURE ; } gd . srk_hash_flag = 0 ; gd . srk_flag = 0 ; gd . srk_sel = 1 ; ret = crypto_extract_pub_key ( gd . pub_fname [ 0 ] , & gd . key_len , gd . key_table [ 0 ] . pkey ) ; return ret ; } gd . srk_flag = 1 ; return ( create_srk_calc_hash ( max_keys ) ) ; }
API's for Calculating SRK Hash
API ' s for Calculating SRK Hash