1TPMLIB_ChooseTPMVersion(3) TPMLIB_ChooseTPMVersion(3)
2
3
4
6 TPMLIB_ChooseTPMVersion - Choose the version of the TPM
7
9 #include <libtpms/tpm_types.h>
10
11 #include <libtpms/tpm_library.h>
12
13 TPM_RESULT TPMLIB_ChooseTPMVersion(TPMLIB_TPMVersion ver);
14
15 typedef enum TPMLIB_TPMVersion {
16 TPMLIB_TPM_VERSION_1_2,
17 TPMLIB_TPM_VERSION_2,
18 } TPMLIB_TPMVersion;
19
21 The TPMLIB_ChooseTPMVersion() function is used to choose the version of
22 the TPM, either a TPM 1.2 or TPM 2.
23
24 This function must be called before TPMLIB_MainInit() is called and
25 will otherwise return an error. This function may be called again once
26 TPMLIB_Terminate() has been called.
27
28 If this function is not called, the last chosen TPM version will be
29 started with TPMLIB_MainInit(). If this function is not called, a TPM
30 1.2 will be used.
31
33 TPM_SUCCESS
34 The version of the TPM was chosen successfully.
35
36 TPM_FAIL
37 The choice of the TPM was wrong, or TPMLIB_MainInit() has already
38 been called.
39
40 For a complete list of TPM error codes please consult the include file
41 libtpms/tpm_error.h
42
44 TPMLIB_MainInit(3), TPMLIB_Terminate(3)
45
46
47
48libtpms 2023-07-17 TPMLIB_ChooseTPMVersion(3)