summaryrefslogtreecommitdiff
path: root/firmware/2lib/2packed_key.c
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-09-04 15:52:25 +0800
committerCommit Bot <commit-bot@chromium.org>2019-10-29 21:27:35 +0000
commit3d8dcc853a98bb8aae91d9a30862541a38581b2d (patch)
tree934ad41cc209cc3161e2fa3581e8f20298107329 /firmware/2lib/2packed_key.c
parent6d43a1925a3f88b4fb8ac3fc9dcfc42ccd934063 (diff)
downloadvboot-3d8dcc853a98bb8aae91d9a30862541a38581b2d.tar.gz
vboot: keep const and non-const signature and key accessors
Keep const (default) and non-const (_mutable suffix) versions of `data` field accessors for vb2_signature and vb2_packed_key. No need for separate 2packed_key.c file -- just static inline the functions. vb2_verify_packed_key_inside should return type vb2_error_t. BUG=b:124141368, chromium:968464 TEST=make clean && make runtests BRANCH=none Change-Id: I96722a746f26abbb6e19a365ce74f0bfda0da381 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1786386 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'firmware/2lib/2packed_key.c')
-rw-r--r--firmware/2lib/2packed_key.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/firmware/2lib/2packed_key.c b/firmware/2lib/2packed_key.c
deleted file mode 100644
index 00262866..00000000
--- a/firmware/2lib/2packed_key.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- *
- * Packed key related functions.
- */
-
-#include "2common.h"
-
-const uint8_t *vb2_packed_key_data(const struct vb2_packed_key *key)
-{
- return (const uint8_t *)key + key->key_offset;
-}
-
-int vb2_verify_packed_key_inside(const void *parent,
- uint32_t parent_size,
- const struct vb2_packed_key *key)
-{
- return vb2_verify_member_inside(parent, parent_size,
- key, sizeof(*key),
- key->key_offset, key->key_size);
-}