1 | /********************************************************************************/
|
---|
2 | /* */
|
---|
3 | /* Ver Structure Handler */
|
---|
4 | /* Written by Ken Goldman */
|
---|
5 | /* IBM Thomas J. Watson Research Center */
|
---|
6 | /* $Id: tpm_ver.h 4071 2010-04-29 19:26:45Z kgoldman $ */
|
---|
7 | /* */
|
---|
8 | /* (c) Copyright IBM Corporation 2006, 2010. */
|
---|
9 | /* */
|
---|
10 | /* All rights reserved. */
|
---|
11 | /* */
|
---|
12 | /* Redistribution and use in source and binary forms, with or without */
|
---|
13 | /* modification, are permitted provided that the following conditions are */
|
---|
14 | /* met: */
|
---|
15 | /* */
|
---|
16 | /* Redistributions of source code must retain the above copyright notice, */
|
---|
17 | /* this list of conditions and the following disclaimer. */
|
---|
18 | /* */
|
---|
19 | /* Redistributions in binary form must reproduce the above copyright */
|
---|
20 | /* notice, this list of conditions and the following disclaimer in the */
|
---|
21 | /* documentation and/or other materials provided with the distribution. */
|
---|
22 | /* */
|
---|
23 | /* Neither the names of the IBM Corporation nor the names of its */
|
---|
24 | /* contributors may be used to endorse or promote products derived from */
|
---|
25 | /* this software without specific prior written permission. */
|
---|
26 | /* */
|
---|
27 | /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
|
---|
28 | /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
|
---|
29 | /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
|
---|
30 | /* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
|
---|
31 | /* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
|
---|
32 | /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
|
---|
33 | /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
|
---|
34 | /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
|
---|
35 | /* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
|
---|
36 | /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
|
---|
37 | /* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
|
---|
38 | /********************************************************************************/
|
---|
39 |
|
---|
40 | #ifndef TPM_VER_H
|
---|
41 | #define TPM_VER_H
|
---|
42 |
|
---|
43 | #include "tpm_types.h"
|
---|
44 | #include "tpm_store.h"
|
---|
45 | #include "tpm_structures.h"
|
---|
46 |
|
---|
47 | /* TPM_STRUCT_VER */
|
---|
48 |
|
---|
49 | void TPM_StructVer_Init(TPM_STRUCT_VER *tpm_struct_ver);
|
---|
50 | TPM_RESULT TPM_StructVer_Load(TPM_STRUCT_VER *tpm_struct_ver,
|
---|
51 | unsigned char **stream,
|
---|
52 | uint32_t *stream_size);
|
---|
53 | TPM_RESULT TPM_StructVer_Store(TPM_STORE_BUFFER *sbuffer,
|
---|
54 | const TPM_STRUCT_VER *tpm_struct_ver);
|
---|
55 | void TPM_StructVer_Copy(TPM_STRUCT_VER *tpm_struct_ver_dest,
|
---|
56 | TPM_STRUCT_VER *tpm_struct_ver_src);
|
---|
57 | TPM_RESULT TPM_StructVer_CheckVer(TPM_STRUCT_VER *tpm_struct_ver);
|
---|
58 |
|
---|
59 | /* TPM_VERSION */
|
---|
60 |
|
---|
61 | void TPM_Version_Init(TPM_VERSION *tpm_version);
|
---|
62 | void TPM_Version_Set(TPM_VERSION *tpm_version,
|
---|
63 | TPM_PERMANENT_DATA *tpm_permanent_data);
|
---|
64 | #if 0
|
---|
65 | TPM_RESULT TPM_Version_Load(TPM_VERSION *tpm_version,
|
---|
66 | unsigned char **stream,
|
---|
67 | uint32_t *stream_size);
|
---|
68 | #endif
|
---|
69 | TPM_RESULT TPM_Version_Store(TPM_STORE_BUFFER *sbuffer,
|
---|
70 | const TPM_VERSION *tpm_version);
|
---|
71 | void TPM_Version_Delete(TPM_VERSION *tpm_version);
|
---|
72 |
|
---|
73 |
|
---|
74 |
|
---|
75 |
|
---|
76 | #endif
|
---|