summaryrefslogtreecommitdiff
path: root/firmware/lib20/packed_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib20/packed_key.c')
-rw-r--r--firmware/lib20/packed_key.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/firmware/lib20/packed_key.c b/firmware/lib20/packed_key.c
index 2e1c9cbc..af888e6e 100644
--- a/firmware/lib20/packed_key.c
+++ b/firmware/lib20/packed_key.c
@@ -11,15 +11,14 @@
#include "vb2_common.h"
test_mockable
-int vb2_unpack_key_buffer(struct vb2_public_key *key,
- const uint8_t *buf,
- uint32_t size)
+vb2_error_t vb2_unpack_key_buffer(struct vb2_public_key *key,
+ const uint8_t *buf, uint32_t size)
{
const struct vb2_packed_key *packed_key =
(const struct vb2_packed_key *)buf;
const uint32_t *buf32;
uint32_t expected_key_size;
- int rv;
+ vb2_error_t rv;
/* Make sure passed buffer is big enough for the packed key */
rv = vb2_verify_packed_key_inside(buf, size, packed_key);
@@ -64,8 +63,8 @@ int vb2_unpack_key_buffer(struct vb2_public_key *key,
return VB2_SUCCESS;
}
-int vb2_unpack_key(struct vb2_public_key *key,
- const struct vb2_packed_key *packed_key)
+vb2_error_t vb2_unpack_key(struct vb2_public_key *key,
+ const struct vb2_packed_key *packed_key)
{
if (!packed_key)
return VB2_ERROR_UNPACK_KEY_BUFFER;