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

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

Issue 2762009: Add vbutil_key (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Util to pack/unpack .vbpubk files Created 10 years, 6 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
« no previous file with comments | « host/include/host_common.h ('k') | host/include/host_misc.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_KEY_H_ 8 #ifndef VBOOT_REFERENCE_HOST_KEY_H_
9 #define VBOOT_REFERENCE_HOST_KEY_H_ 9 #define VBOOT_REFERENCE_HOST_KEY_H_
10 10
(...skipping 30 matching lines...) Expand all
41 VbPublicKey* PublicKeyAlloc(uint64_t key_size, uint64_t algorithm, 41 VbPublicKey* PublicKeyAlloc(uint64_t key_size, uint64_t algorithm,
42 uint64_t version); 42 uint64_t version);
43 43
44 44
45 /* Copy a public key from [src] to [dest]. 45 /* Copy a public key from [src] to [dest].
46 * 46 *
47 * Returns 0 if success, non-zero if error. */ 47 * Returns 0 if success, non-zero if error. */
48 int PublicKeyCopy(VbPublicKey* dest, const VbPublicKey* src); 48 int PublicKeyCopy(VbPublicKey* dest, const VbPublicKey* src);
49 49
50 50
51 /* Read a public key from a file. Caller owns the returned pointer, 51 /* Read a public key from a .vbpubk file. Caller owns the returned
52 * and must free it with Free(). 52 * pointer, and must free it with Free().
53 * 53 *
54 * Returns NULL if error. */ 54 * Returns NULL if error. */
55 /* TODO: should really store public keys in files as VbPublicKey */ 55 VbPublicKey* PublicKeyRead(const char* filename);
56 VbPublicKey* PublicKeyRead(const char* filename, uint64_t algorithm, 56
57 uint64_t version); 57
58 /* Read a public key from a .keyb file. Caller owns the returned
59 * pointer, and must free it with Free().
60 *
61 * Returns NULL if error. */
62 VbPublicKey* PublicKeyReadKeyb(const char* filename, uint64_t algorithm,
63 uint64_t version);
64
65
66 /* Write a public key to a file in .vbpubk format. */
67 int PublicKeyWrite(const char* filename, const VbPublicKey* key);
68
58 69
59 #endif /* VBOOT_REFERENCE_HOST_KEY_H_ */ 70 #endif /* VBOOT_REFERENCE_HOST_KEY_H_ */
OLDNEW
« no previous file with comments | « host/include/host_common.h ('k') | host/include/host_misc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698