| Index: src/platform/vboot_reference/utils/file_keys.c
|
| diff --git a/src/platform/vboot_reference/utils/file_keys.c b/src/platform/vboot_reference/utils/file_keys.c
|
| index 275ca6b7cf25f65db06862136586de9569dfc30d..84383514d8d7d54ca57a8de7b92c790d6beef7a8 100644
|
| --- a/src/platform/vboot_reference/utils/file_keys.c
|
| +++ b/src/platform/vboot_reference/utils/file_keys.c
|
| @@ -15,7 +15,8 @@
|
| #include <sys/types.h>
|
| #include <unistd.h>
|
|
|
| -#include "cryptolib.h"
|
| +#include "padding.h"
|
| +#include "rsa_utility.h"
|
| #include "signature_digest.h"
|
| #include "utility.h"
|
|
|
| @@ -59,27 +60,6 @@ RSAPublicKey* RSAPublicKeyFromFile(const char* input_file) {
|
| return key;
|
| }
|
|
|
| -uint8_t* DigestFile(char* input_file, int sig_algorithm) {
|
| - int input_fd, len;
|
| - uint8_t data[SHA1_BLOCK_SIZE];
|
| - uint8_t* digest = NULL;
|
| - DigestContext ctx;
|
| -
|
| - if( (input_fd = open(input_file, O_RDONLY)) == -1 ) {
|
| - debug("Couldn't open input file.\n");
|
| - return NULL;
|
| - }
|
| - DigestInit(&ctx, sig_algorithm);
|
| - while ( (len = read(input_fd, data, SHA1_BLOCK_SIZE)) ==
|
| - SHA1_BLOCK_SIZE)
|
| - DigestUpdate(&ctx, data, len);
|
| - if (len != -1)
|
| - DigestUpdate(&ctx, data, len);
|
| - digest = DigestFinal(&ctx);
|
| - close(input_fd);
|
| - return digest;
|
| -}
|
| -
|
| uint8_t* SignatureFile(const char* input_file, const char* key_file,
|
| int algorithm) {
|
| char* sign_utility = "./sign_data.sh";
|
|
|