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

Side by Side Diff: host/include/host_keyblock.h

Issue 4194003: Add support for using external signing application and .pem private key files to vbutil_keyblock. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: fix read() bug Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | host/include/host_signature.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Host-side functions for verified boot. 5 * Host-side functions for verified boot.
6 */ 6 */
7 7
8 #ifndef VBOOT_REFERENCE_HOST_KEYBLOCK_H_ 8 #ifndef VBOOT_REFERENCE_HOST_KEYBLOCK_H_
9 #define VBOOT_REFERENCE_HOST_KEYBLOCK_H_ 9 #define VBOOT_REFERENCE_HOST_KEYBLOCK_H_
10 10
11 #include "host_key.h" 11 #include "host_key.h"
12 #include "vboot_struct.h" 12 #include "vboot_struct.h"
13 13
14 14
15 /* Create a key block header containing [data_key] and [flags], signed 15 /* Create a key block header containing [data_key] and [flags], signed
16 * by private key the file [signing_key_pem_file] and algorithm [algorithm]
17 * using the external signer program [external_signer] for all private key
18 * operations.
19 * Caller owns the returned pointer, and must free
20 * it with Free(). */
21 VbKeyBlockHeader* KeyBlockCreate_external(const VbPublicKey* data_key,
22 const char* signing_key_pem_file,
23 uint64_t algorithm,
24 uint64_t flags,
25 const char* external_signer);
26
27 /* Create a key block header containing [data_key] and [flags], signed
16 * by [signing_key]. Caller owns the returned pointer, and must free 28 * by [signing_key]. Caller owns the returned pointer, and must free
17 * it with Free(). */ 29 * it with Free(). */
18 VbKeyBlockHeader* KeyBlockCreate(const VbPublicKey* data_key, 30 VbKeyBlockHeader* KeyBlockCreate(const VbPublicKey* data_key,
19 const VbPrivateKey* signing_key, 31 const VbPrivateKey* signing_key,
20 uint64_t flags); 32 uint64_t flags);
21 33
22 34
23 /* Read a key block from a .keyblock file. Caller owns the returned 35 /* Read a key block from a .keyblock file. Caller owns the returned
24 * pointer, and must free it with Free(). 36 * pointer, and must free it with Free().
25 * 37 *
26 * Returns NULL if error. */ 38 * Returns NULL if error. */
27 VbKeyBlockHeader* KeyBlockRead(const char* filename); 39 VbKeyBlockHeader* KeyBlockRead(const char* filename);
28 40
29 41
30 /* Write a key block to a file in .keyblock format. */ 42 /* Write a key block to a file in .keyblock format. */
31 int KeyBlockWrite(const char* filename, const VbKeyBlockHeader* key_block); 43 int KeyBlockWrite(const char* filename, const VbKeyBlockHeader* key_block);
32 44
33 #endif /* VBOOT_REFERENCE_HOST_KEYBLOCK_H_ */ 45 #endif /* VBOOT_REFERENCE_HOST_KEYBLOCK_H_ */
OLDNEW
« no previous file with comments | « no previous file | host/include/host_signature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698