VirtualBox

source: vbox/trunk/src/libs/libtpms-0.9.0/man/man3/TPMLIB_SetState.pod@ 92824

最後變更 在這個檔案從92824是 91612,由 vboxsync 提交於 3 年 前

src/libs: Export libtpms-0.9.0, bugref:10078

檔案大小: 2.2 KB
 
1=head1 NAME
2
3TPMLIB_SetState - Set the TPM's volatile, permanent, or save state
4
5TPMLIB_GetState - Get the TPM's volatile, permanent, or save state
6
7=head1 LIBRARY
8
9TPM library (libtpms, -ltpms)
10
11=head1 SYNOPSIS
12
13B<#include <libtpms/tpm_library.h>>
14
15B<TPM_RESULT TPMLIB_SetState(enum TPMLIB_StateType st,
16 const unsigned char *buffer, uint32_t buflen);>
17
18B<TPM_RESULT TPMLIB_GetState(enum TPMLIB_StateType st,
19 unsigned char **buffer, uint32_t *buflen);>
20
21=head1 DESCRIPTION
22
23The B<TPMLIB_SetState()> function allows to set either one of the state blobs of
24the TPM. The passed state blob is tested for whether it can be accepted and a TPM
25error code is returned in case it cannot be accepted. In case of acceptance, the
26state blob will be passed to the TPM upon B<TPM_MainInit()>. Setting a state blob
27hides a file that may contain the same type of blob and would be read otherwise.
28It is required to call this function with a NULL pointer for the buffer parameter
29to hide a state blob in a file.
30
31It is only possible to set the state blobs after B<TPMLIB_ChooseTPMVersion()>
32has been called. All state blobs are cleared when a different version of TPM is
33chosen using B<TPMLIB_ChooseTPMVersion> or when a call to B<TPMLIB_SetState()>
34fails because a state blob could not be accepted.
35
36The order in which state blobs are set is important. The first state blob has
37to be the one representing the TPM's permanent state. Only after that either
38the volatile or save state blobs can be set.
39
40The B<TPMLIB_GetState()> function allows to get the current state of the TPM.
41For as long as the TPM has not been started, this function either returns the state
42blob previously set with B<TPMLIB_SetState()> or the state is read from a file.
43Once the TPM has been start the state of the running TPM is returned.
44
45The B<TPMLIB_STATE_SAVE_STATE> (save state) type of TPM state can be set with this
46function. The same state blob will be returned until TPM_Startup(ST_STATE) has been
47called, after which an empty blob will be returned. This blob can also only be
48read after TPM_SaveState() has been sent to the TPM.
49
50=head1 SEE ALSO
51
52B<TPMLIB_ChooseTPMVersion>(3), B<TPMLIB_MainInit>(3), B<TPMLIB_Terminate>(3)
53
54=cut
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette