VBoot Reference: Refactor Part 2 - Crypto Libraries

Removing multiple top level includes - now padding.h, rsa.h and sha.h are used internally and cryptolib.h must be used instead for all modules that wish to use crypto functions.

I am trying to separate refactors involving code movement from one file to another, and the movement of files themselves into separate CLs so that it's clear what changed.

Review URL: http://codereview.chromium.org/1574005
This commit is contained in:
Gaurav Shah
2010-03-30 23:08:10 -07:00
parent ed9c96a7aa
commit d46c347018
42 changed files with 234 additions and 255 deletions

View File

@@ -8,7 +8,7 @@
#ifndef VBOOT_REFERENCE_FILE_KEYS_H_
#define VBOOT_REFERENCE_FILE_KEYS_H_
#include "rsa.h"
#include "cryptolib.h"
/* Read file named [input_file] into a buffer and stores the length into
* [len].
@@ -25,6 +25,12 @@ uint8_t* BufferFromFile(const char* input_file, uint64_t* len);
*/
RSAPublicKey* RSAPublicKeyFromFile(const char* input_file);
/* Returns the appropriate digest for the data in [input_file]
* based on the signature [algorithm].
* Caller owns the returned digest and must free it.
*/
uint8_t* DigestFile(char* input_file, int sig_algorithm);
/* Helper function to invoke external program to calculate signature on
* [input_file] using private key [key_file] and signature algorithm
* [algorithm].