Data structure and interface for manipulating and handing firmware images for verified boot.

Review URL: http://codereview.chromium.org/564020
This commit is contained in:
Gaurav Shah
2010-02-12 15:54:37 -08:00
parent 1a055adf7b
commit 431b98886e
10 changed files with 872 additions and 41 deletions

28
include/file_keys.h Normal file
View File

@@ -0,0 +1,28 @@
/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Utility functions for file and key handling.
*/
#ifndef VBOOT_REFERENCE_FILE_KEYS_H_
#define VBOOT_REFERENCE_FILE_KEYS_H_
#include "rsa.h"
/* Read file named [input_file] into a buffer and stores the length into
* [len].
*
* Returns a pointer to the buffer. Caller owns the returned pointer and
* must free it.
*/
uint8_t* BufferFromFile(char* input_file, int* len);
/* Read a pre-processed RSA Public Key from file [input_file].
*
* Returns a pointer to the read key. Caller owns the returned pointer and
* must free it.
*/
RSAPublicKey* RSAPublicKeyFromFile(char* input_file);
#endif /* VBOOT_REFERENCE_FILE_KEYS_H_ */