Home | History | Annotate | Download | only in include
      1 /* Copyright (c) 2014 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 key structures
      6  */
      7 
      8 #ifndef VBOOT_REFERENCE_HOST_KEYBLOCK2_H_
      9 #define VBOOT_REFERENCE_HOST_KEYBLOCK2_H_
     10 
     11 #include "2struct.h"
     12 
     13 struct vb2_private_key;
     14 struct vb2_public_key;
     15 
     16 /**
     17  * Create and sign a keyblock.
     18  *
     19  * @param kb_ptr	On success, points to a newly allocated keyblock buffer.
     20  *			Caller is responsible for calling free() on this.
     21  * @param data_key	Data key to contain inside keyblock.
     22  * @param signing_keys	List of keys to sign the keyblock with.
     23  * @param signing_key_count	Number of keys in signing_keys.
     24  * @param flags		Flags for keyblock.
     25  * @param desc		Description for keyblock.  If NULL, description will be
     26  *			taken from the data key.
     27  * @return VB2_SUCCESS, or non-zero error code if failure.
     28  */
     29 int vb2_keyblock_create(struct vb2_keyblock **kb_ptr,
     30 			const struct vb2_public_key *data_key,
     31 			const struct vb2_private_key **signing_keys,
     32 			uint32_t signing_key_count,
     33 			uint32_t flags,
     34 			const char *desc);
     35 
     36 #endif  /* VBOOT_REFERENCE_HOST_KEYBLOCK2_H_ */
     37