blob: 375d4faf82cde723e7690cab62583c31eed6d3f6 [file] [log] [blame]
Randall Spanglerda2b49c2014-06-10 17:03:40 -07001/* 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 * Stub API implementations which should be implemented by the caller.
6 */
7
8#include "2sysincludes.h"
9#include "2api.h"
10
Julius Wernerf10e9092014-12-16 19:24:54 -080011__attribute__((weak))
Randall Spanglerda2b49c2014-06-10 17:03:40 -070012int vb2ex_tpm_clear_owner(struct vb2_context *ctx)
13{
Randall Spangler25c95d02014-06-20 13:57:12 -070014 return VB2_ERROR_EX_TPM_CLEAR_OWNER_UNIMPLEMENTED;
Randall Spanglerda2b49c2014-06-10 17:03:40 -070015}
16
Julius Wernerf10e9092014-12-16 19:24:54 -080017__attribute__((weak))
Randall Spanglerda2b49c2014-06-10 17:03:40 -070018int vb2ex_read_resource(struct vb2_context *ctx,
19 enum vb2_resource_index index,
20 uint32_t offset,
21 void *buf,
22 uint32_t size)
23{
Randall Spangler25c95d02014-06-20 13:57:12 -070024 return VB2_ERROR_EX_READ_RESOURCE_UNIMPLEMENTED;
Randall Spanglerda2b49c2014-06-10 17:03:40 -070025}
Julius Wernerf10e9092014-12-16 19:24:54 -080026
27__attribute__((weak))
28int vb2ex_hwcrypto_digest_init(enum vb2_hash_algorithm hash_alg,
29 uint32_t data_size)
30{
31 return VB2_ERROR_EX_HWCRYPTO_UNSUPPORTED;
32}
33
34__attribute__((weak))
35int vb2ex_hwcrypto_digest_extend(const uint8_t *buf,
36 uint32_t size)
37{
38 return VB2_ERROR_SHA_EXTEND_ALGORITHM; /* Should not be called. */
39}
40
41__attribute__((weak))
42int vb2ex_hwcrypto_digest_finalize(uint8_t *digest,
43 uint32_t digest_size)
44{
45 return VB2_ERROR_SHA_FINALIZE_ALGORITHM; /* Should not be called. */
46}