blob: 4ea53558f981b0d3c02b565a094a4304d195719f [file] [log] [blame]
Daisuke Nojiri5d302c72015-04-09 08:18:22 -07001/* Copyright (c) 2015 The Chromium OS Authors. All rights reserved.
Daisuke Nojiri5d302c72015-04-09 08:18:22 -07002 *
Martin Roth08d808f2017-02-09 18:06:16 -08003 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are
5 * met:
6 *
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above
10 * copyright notice, this list of conditions and the following disclaimer
11 * in the documentation and/or other materials provided with the
12 * distribution.
13 * * Neither the name of Google Inc. nor the names of its
14 * contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30/*
Daisuke Nojiri5d302c72015-04-09 08:18:22 -070031 * Functions for querying, manipulating and locking rollback indices
32 * stored in the TPM NVRAM.
33 */
34
Philipp Deppenwiese64e2d192017-10-18 17:13:07 +020035#include <security/tpm/antirollback.h>
Daisuke Nojiri5d302c72015-04-09 08:18:22 -070036#include <stdlib.h>
Philipp Deppenwiesed88fb362017-10-18 20:26:18 +020037#include <security/tpm/tss.h>
Daisuke Nojiri5d302c72015-04-09 08:18:22 -070038#include <vb2_api.h>
39
40uint32_t tpm_extend_pcr(struct vb2_context *ctx, int pcr,
41 enum vb2_pcr_digest which_digest)
42{
43 return TPM_SUCCESS;
44}
45
46uint32_t tpm_clear_and_reenable(void)
47{
48 return TPM_SUCCESS;
49}
50
Daisuke Nojiri5d302c72015-04-09 08:18:22 -070051uint32_t antirollback_read_space_firmware(struct vb2_context *ctx)
52{
53 vb2api_secdata_create(ctx);
54 return TPM_SUCCESS;
55}
56
57uint32_t antirollback_write_space_firmware(struct vb2_context *ctx)
58{
59 return TPM_SUCCESS;
60}
61
62uint32_t antirollback_lock_space_firmware()
63{
64 return TPM_SUCCESS;
65}
Furquan Shaikhb038f412016-11-07 23:47:11 -080066
67uint32_t antirollback_lock_space_rec_hash(void)
68{
69 return TPM_SUCCESS;
70}
Furquan Shaikh775765e2017-01-26 15:33:01 -080071
72uint32_t antirollback_read_space_rec_hash(uint8_t *data, uint32_t size)
73{
74 return TPM_SUCCESS;
75}
76
77uint32_t antirollback_write_space_rec_hash(const uint8_t *data, uint32_t size)
78{
79 return TPM_SUCCESS;
80}
Furquan Shaikh00f360e2017-04-25 22:32:34 -070081
82uint32_t tlcl_lib_init(void)
83{
84 return VB2_SUCCESS;
85}