summaryrefslogtreecommitdiff
path: root/firmware/lib/include/vboot_test.h
blob: 35a3451a311ba17c6e221a86a4e3ea993a157f5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* 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.
 * 
 * This header is for APIs that are only used by test code.
 */

#ifndef VBOOT_REFERENCE_TEST_API_H_
#define VBOOT_REFERENCE_TEST_API_H_

/****************************************************************************
 * 2rsa.c
 *
 * Internal functions from 2rsa.c that have error conditions we can't trigger
 * from the public APIs.  These include checks for bad algorithms where the
 * next call level up already checks for bad algorithms, etc.
 *
 * These functions aren't in 2rsa.h because they're not part of the public
 * APIs.
 */
struct vb2_public_key;
int vb2_mont_ge(const struct vb2_public_key *key, uint32_t *a);
vb2_error_t vb2_check_padding(const uint8_t *sig,
			      const struct vb2_public_key *key);

/****************************************************************************
 * vboot_api_kernel.c */

struct LoadKernelParams;
struct LoadKernelParams *VbApiKernelGetParams(void);

/****************************************************************************
 * 2secdata_kernel.c */

/**
 * Calculate crc8 of kernel secure storage.
 *
 * @param ctx		Context pointer
 * @return Calculated crc8 value.
 */
uint8_t vb2_secdata_kernel_crc(struct vb2_context *ctx);

#endif  /* VBOOT_REFERENCE_TEST_API_H_ */