OLD | NEW |
(Empty) | |
| 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 |
| 3 * found in the LICENSE file. |
| 4 * |
| 5 * Host-side functions for verified boot. |
| 6 */ |
| 7 |
| 8 #ifndef VBOOT_REFERENCE_HOST_KEYBLOCK_H_ |
| 9 #define VBOOT_REFERENCE_HOST_KEYBLOCK_H_ |
| 10 |
| 11 #include <stdint.h> |
| 12 |
| 13 #include "host_key.h" |
| 14 #include "vboot_struct.h" |
| 15 |
| 16 |
| 17 /* Create a key block header containing [data_key] and [flags], signed |
| 18 * by [signing_key]. Caller owns the returned pointer, and must free |
| 19 * it with Free(). */ |
| 20 VbKeyBlockHeader* KeyBlockCreate(const VbPublicKey* data_key, |
| 21 const VbPrivateKey* signing_key, |
| 22 uint64_t flags); |
| 23 |
| 24 |
| 25 /* Read a key block from a .keyblock file. Caller owns the returned |
| 26 * pointer, and must free it with Free(). |
| 27 * |
| 28 * Returns NULL if error. */ |
| 29 VbKeyBlockHeader* KeyBlockRead(const char* filename); |
| 30 |
| 31 |
| 32 /* Write a key block to a file in .keyblock format. */ |
| 33 int KeyBlockWrite(const char* filename, const VbKeyBlockHeader* key_block); |
| 34 |
| 35 #endif /* VBOOT_REFERENCE_HOST_KEYBLOCK_H_ */ |
OLD | NEW |