Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: src/platform/vboot_reference/include/file_keys.h

Issue 650105: Vboot Reference: Add the "real" reference firmware verification function (VerifyFirmware). (Closed)
Patch Set: Review fixes. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Utility functions for file and key handling. 5 * Utility functions for file and key handling.
6 */ 6 */
7 7
8 #ifndef VBOOT_REFERENCE_FILE_KEYS_H_ 8 #ifndef VBOOT_REFERENCE_FILE_KEYS_H_
9 #define VBOOT_REFERENCE_FILE_KEYS_H_ 9 #define VBOOT_REFERENCE_FILE_KEYS_H_
10 10
11 #include "rsa.h" 11 #include "rsa.h"
12 12
13 /* Read file named [input_file] into a buffer and stores the length into 13 /* Read file named [input_file] into a buffer and stores the length into
14 * [len]. 14 * [len].
15 * 15 *
16 * Returns a pointer to the buffer. Caller owns the returned pointer and 16 * Returns a pointer to the buffer. Caller owns the returned pointer and
17 * must free it. 17 * must free it.
18 */ 18 */
19 uint8_t* BufferFromFile(char* input_file, int* len); 19 uint8_t* BufferFromFile(char* input_file, int* len);
20 20
21 /* Read a pre-processed RSA Public Key from file [input_file]. 21 /* Read a pre-processed RSA Public Key from file [input_file].
22 * 22 *
23 * Returns a pointer to the read key. Caller owns the returned pointer and 23 * Returns a pointer to the read key. Caller owns the returned pointer and
24 * must free it. 24 * must free it.
25 */ 25 */
26 RSAPublicKey* RSAPublicKeyFromFile(char* input_file); 26 RSAPublicKey* RSAPublicKeyFromFile(char* input_file);
27 27
28 /* Helper function to invoke external program to calculate signature on
29 * [input_file] using private key [key_file] and signature algorithm
30 * [algorithm].
31 *
32 * Returns the signature. Caller owns the buffer and must Free() it.
33 */
34 uint8_t* SignatureFile(char* input_fie, char* key_file, int algorithm);
35
28 #endif /* VBOOT_REFERENCE_FILE_KEYS_H_ */ 36 #endif /* VBOOT_REFERENCE_FILE_KEYS_H_ */
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/crypto/sha_utility.c ('k') | src/platform/vboot_reference/include/firmware_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698