mirror of
https://github.com/stefanberger/libtpms
synced 2025-08-24 17:39:47 +00:00

Introduce --with-tpm2 for ./configure to enable building with TPM 2 functionality. Delay the building of TPM 2 code until more patches are applied and the vTPM state that's created has a chance of being backwards compatible. Extend the libtpms API to allow user to choose version of TPM. Missing functionality at this point: - TPM 2 needs to be extended to serialize and deserialize its volatile state - Handling of the establishment bit Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
=head1 NAME
|
|
|
|
TPMLIB_ChooseTPMVersion - Choose the version of the TPM
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
B<#include <libtpms/tpm_types.h>>
|
|
|
|
B<#include <libtpms/tpm_library.h>>
|
|
|
|
B<TPM_RESULT TPMLIB_ChooseTPMVersion(TPMLIB_TPMVersion> I<ver>B<);>
|
|
|
|
typedef enum TPMLIB_TPMVersion {
|
|
TPMLIB_TPM_VERSION_1_2,
|
|
TPMLIB_TPM_VERSION_2,
|
|
} TPMLIB_TPMVersion;
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
The B<TPMLIB_ChooseTPMVersion()> function is used to choose the version
|
|
of the TPM, either a TPM 1.2 or TPM 2.
|
|
|
|
This function must be called before B<TPMLIB_MainInit()> is called and
|
|
will otherwise return an error. This function may be called again once
|
|
B<TPMLIB_Terminate()> has been called.
|
|
|
|
If this function is not called, the last chosen TPM version will be
|
|
started with B<TPMLIB_MainInit()>. If this function is not called,
|
|
a TPM 1.2 will be used.
|
|
|
|
=head1 ERRORS
|
|
|
|
=over 4
|
|
|
|
=item B<TPM_SUCCESS>
|
|
|
|
The version of the TPM was chosen successfully.
|
|
|
|
=item B<TPM_FAIL>
|
|
|
|
The choice of the TPM was wrong, or TPMLIB_MainInit() has already been called.
|
|
|
|
=back
|
|
|
|
For a complete list of TPM error codes please consult the include file
|
|
B<libtpms/tpm_error.h>
|
|
|
|
=head1 SEE ALSO
|
|
|
|
B<TPMLIB_MainInit>(3), B<TPMLIB_Terminate>(3)
|
|
|
|
=cut
|