secimage: reformat

Change-Id: Ibfa8b6b60b2b39212cef27bb2a5f8849218164bb
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/11133
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Stefan Reinauer
2015-08-06 16:55:09 -07:00
committed by Patrick Georgi
parent 133108af25
commit 9dd8f88841
5 changed files with 48 additions and 82 deletions

View File

@ -11,14 +11,12 @@
* GNU General Public License for more details.
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "secimage.h"
#include <openssl/hmac.h>
/*----------------------------------------------------------------------
* Name : HmacSha256Hash
* Purpose :
@ -32,8 +30,7 @@ int HmacSha256Hash(uint8_t *data, uint32_t len, uint8_t *hash, uint8_t *key)
HMAC_CTX_init(&hctx);
HMAC_Init_ex(&hctx, key, 32, EVP_sha256(), NULL);
/*
* FIXME: why we need this? NULL means to use whatever there is?
/* FIXME: why we need this? NULL means to use whatever there is?
* if removed, result is different
*/
HMAC_Init_ex(&hctx, NULL, 0, NULL, NULL);
@ -44,7 +41,6 @@ int HmacSha256Hash(uint8_t *data, uint32_t len, uint8_t *hash, uint8_t *key)
return 0;
}
/*----------------------------------------------------------------------
* Name : AppendHMACSignature
* Purpose : Appends HMAC signature at the end of the data