Commit Graph

26 Commits

Author SHA1 Message Date
Stefan Berger
45134aef3e build-sys: Build libtpms v0.9.6
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-02-28 15:57:55 -05:00
Stefan Berger
6728aada47 build-sys: Build libtpms v0.9.4
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-05-24 23:40:22 -04:00
Stefan Berger
c2e840b88b build-sys: Build libtpms v0.9.4
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-03-30 13:34:48 -04:00
Stefan Berger
0a11a6726d build-sys: Build libtpms v0.9.3
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-03-02 09:15:37 -05:00
Stefan Berger
52cd3bcdfd build-sys: Build libtpms v0.9.2
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-01-05 08:07:18 -05:00
Stefan Berger
dbfc15279a build-sys: Build libtpms v0.9.1
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-10-15 17:10:21 -04:00
Marc-André Lureau
e60c35ecf9 Move common debug, memory & nvfile units to src/
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-08-06 08:04:37 -04:00
Stefan Berger
1253aa359b Bump up the revision of the library for next version to 0.9.0
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-02-24 15:08:38 -05:00
Stefan Berger
e97909d845 tpm2: Add RSAKeySizes field to TPM2_GetInfo() JSON under new flag
Return the RSAKeySizes in the JSON produced by TPM2_GetInfo() under
a new flag with value '4'. This helps higher level tools and users
to easily determine what key sizes are supported for RSA.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-05-04 08:01:26 -04:00
Stefan Berger
625abcc688 Bump up the revision of the library for next version to 0.8.0
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-07-19 13:54:18 -04:00
Stefan Berger
af7e924372 Bump up the revision of the library for next version to 0.7.0
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-03-18 21:14:49 -04:00
Stefan Berger
73cad883ba tpm2: Introduce TPM_HAVE_TPM2_DECLARATIONS to avoid re-declarations
Older gcc versions are unhappy that some types declared by TPM 1.2
headers are re-declared by TPM 2 headers. All of these types have
the same UINT32 datatype and we can avoid having the re-declared
by introducing TPM_HAVE_TPM2_DECLARATIONS and inlcuding the TPM2
headers first and then the TPM 1.2 headers where we then do not re-
declare those datatypes that are clashing.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-10-05 21:47:15 -04:00
Stefan Berger
3cf528aaac Integrate the TPM 2 into the library; do not compile with TPM 2 yet
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>
2018-06-15 18:07:47 -04:00
Stefan Berger
ec672b4e37 Expose the two new API calls TPMLIB_Get/SetState
Expose the two new API calls TPMLIB_GetState() and TPMLIB_SetState().
Fix one parameter in the TPMLIB_GetState() call.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-05-11 16:10:09 -04:00
Stefan Berger
c76f52efd3 Add APIs for getting and setting all state blobs
This patch adds APIs for getting and setting all types of state
blobs. We cache these blobs and allow them to be picked up when
the TPM starts. It will get any of these state blobs, if they
were set, before we go out and try to read the state blob from
a file.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-05-10 16:35:09 -04:00
Stefan Berger
fe481765b9 Add TPMAttributes JSON object to GetInfo interface
Requesting TPMLIB_INFO_TPMATTRIBUTES returns:

{
  "TPMAttributes": {
    "manufacturer": "id:00001014",
    "version": "id:00740001",
    "model": "swtpm"
  }
}

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-05-04 19:36:05 -04:00
Stefan Berger
70547a758b Implement TPMLIB_GetInfo() to for example get TPM spec. info
The EK certificates need information about the TPM specification that was
implemented. The best place to get the information from seems the TPM itself.
So we implement a function TPMLIB_GetInfo() to allow to query for the TPM
specification information and possibly other information in the future.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-04-23 07:10:01 -04:00
Stefan Berger
e11dbf255b Implement TPMLIB_ValidateState() to test state blobs early
Implement TPMLIB_ValidateState(), which is supposed to be used
for checking usability of state blobs before TPMLIB_MainInit()
is called or TPM_Startup has been sent to the TPM.

This function is useful to be called once TPM state blobs
have been migrated to a destination and we need to check
whether libtpms can use these state blobs and if not
we have a chance to fall back to the migration source host.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-02-17 15:00:39 -05:00
Stefan Berger
ae3f105ac3 Extend TPMLIB_SetBufferSize() call with min/max size parameters
Also allow to get the minimum and maximum supported buffer size
with the TPMLIB_SetBufferSize() call.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-11-05 11:57:07 -05:00
Stefan Berger
bc195a3452 Implement TPMLIB_SetBufferSize() for setting the size of the I/O buffer
Implement TPMLIB_SetBufferSize() for setting the size of the I/O buffer
that the TPM may advertise. For TPM 1.2 the size remains fixed since the
TIS interface can handle the current 4096 bytes.

This function will be important for TPM 2 with a CRB interface that cannot
handle 4096 bytes.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-11-04 00:52:30 -04:00
Stefan Berger
7fb176bcc4 Implement API calls for enabling debug output
Add API calls TPMLIB_SetDebugFD(), TPMLIB_SetDebugLevel(),
TPMLIB_SetDebugPrefix().

Convert the internal printing of debugging strings to
correspond to the log level. Print the prefix in front
of every line.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-01-23 18:53:31 -05:00
Stefan Berger
2c6ceaed6f Add include file containering library version
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-12-07 19:36:49 -05:00
Stefan Berger
e04b1231ec Fix public header files for c++
Fix the public header files for c++ usage.
2014-07-14 17:22:14 -04:00
Stefan Berger
f1cb52002c Remove tpm_library.h since it is generated from tpm_library.h.in
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2014-06-30 15:04:15 -04:00
Stefan Berger
54c5659647 Remove unnecessary build files from repository
Remove unnecessary files in the repository and add boostrap.sh to create the
configure file and other files we are removing here. Users have to run
bootstrap.sh to have those files created in their build environment.
Update the INSTALL instructions.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Acked-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
2014-01-13 16:39:13 -05:00
Corey Bryant
a0098eda2d Initial import of project
This is the initial import of the libtpms library.  The libtpms library
provides software emulation of a Trusted Platform Module (TPM).  It is
intended to be used by applications when a hardware TPM is not adequate.
For example, a hypervisor can use libtpms to emulate an independent TPM
for each of it's virtual machine guests.  The library provides a high-
level API for developers to integrate the emulated TPM support into
their application.

The code was originally written by Kenneth Goldman <kgoldman@us.ibm.com>
and Stefan Berger <stefanb@us.ibm.com>.

The code is licensed under the Modified BSD License.

Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
2013-10-31 15:33:22 -05:00