tools/header_generation/create_hdr_common.c
/***************************************************************************
 * Function	:	append_signature
 * Arguments	:	NONE
 * Return	:	SUCCESS or FAILURE
 * Description	:	Appends Signature to end of HDR
 ***************************************************************************/
Function     :       append_signature
Arguments    :       NONE
Return       :       SUCCESS or FAILURE
Description  :       Appends Signature to end of HDR
Function : append_signature Arguments : NONE Return : SUCCESS or FAILURE Description : Appends Signature to end of HDR
int append_signature(void)
{
	int i;
	FILE *fhdr;
	char ch;
	fhdr = fopen(gd.hdr_file_name, "ab");
	if (fhdr == NULL) {
		printf("Error in opening the file: %s\n",
			gd.hdr_file_name);
		return FAILURE;
	}
	for (i = 0; i < gd.rsa_size; i++) {
		ch = gd.rsa_sign[i];
		fputc(ch, fhdr);
	}
	fclose(fhdr);
	return SUCCESS;
}
int append_signature ( void ) { int i ; FILE * fhdr ; char ch ; fhdr = fopen ( gd . hdr_file_name , " " ) ; if ( fhdr == NULL ) { printf ( " \n " , gd . hdr_file_name ) ; return FAILURE ; } for ( i = 0 ; i < gd . rsa_size ; i ++ ) { ch = gd . rsa_sign [ i ] ; fputc ( ch , fhdr ) ; } fclose ( fhdr ) ; return SUCCESS ; }
Function     :       append_signature
 Arguments    :       NONE
 Return       :       SUCCESS or FAILURE
 Description  :       Appends Signature to end of HDR
Function : append_signature Arguments : NONE Return : SUCCESS or FAILURE Description : Appends Signature to end of HDR
/* Open the OUTPUT_HDR_FILENAME in 'Append Binary' Mode */