Debian Codegraph @

3rdparty/vboot/host/lib/host_p11_stub.c

raw symbols SCIP
1 /* Copyright 2024 The ChromiumOS Authors
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 #include "2common.h"
7 #include "host_p11.h"
8
9 #define MISSING_PKCS11 \
10 VB2_DEBUG("%s() called, but compiled without PKCS#11 support (libnss).\n", __func__)
11
12 vb2_error_t pkcs11_init(const char *pkcs11_lib)
13 {
14 MISSING_PKCS11;
15 return VB2_ERROR_UNKNOWN;
16 }
17
18 struct pkcs11_key *pkcs11_get_key(int slot_id, char *label)
19 {
20 MISSING_PKCS11;
21 return NULL;
22 }
23
24 enum vb2_hash_algorithm pkcs11_get_hash_alg(struct pkcs11_key *p11_key)
25 {
26 MISSING_PKCS11;
27 return VB2_HASH_INVALID;
28 }
29
30 enum vb2_signature_algorithm pkcs11_get_sig_alg(struct pkcs11_key *p11_key)
31 {
32 MISSING_PKCS11;
33 return VB2_SIG_INVALID;
34 }
35
36 uint8_t *pkcs11_get_modulus(struct pkcs11_key *p11_key, uint32_t *sizeptr)
37 {
38 MISSING_PKCS11;
39 return NULL;
40 }
41
42 vb2_error_t pkcs11_sign(struct pkcs11_key *p11_key, enum vb2_hash_algorithm hash_alg,
43 const uint8_t *data, int data_size, uint8_t *sig, uint32_t sig_size)
44 {
45 MISSING_PKCS11;
46 return VB2_ERROR_UNKNOWN;
47 }
48
49 void pkcs11_free_key(struct pkcs11_key *p11_key)
50 {
51 }