Age | Commit message (Collapse) | Author |
|
This isn't required, and isn't in the spec, because this header exposes
no symbols that C++ would mangle.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
This makes us compatible with the latest spec on the TCG site.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
TPMU_NAME type is a special case of the TPMU_ types, which doesn't
have a explicit selector. The value of the size is used instead as
a selector as specified in the TCG spec, part2, 10.5.3 section:
"The type of Name in the structure is determined by context and
the size parameter. If size is four, then the Name is a handle.
If size is zero, then no Name is present. Otherwise, the size shall
be the size of a TPM_ALG_ID plus the size of the digest produced
by the indicated hash algorithm."
Fixes: #720
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
This addresses feedback from TSS2 WG: The INFO structure should be
versioned just like we do the context structure. The two version
structures must be identical for both structures.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
These look like leftovers from an old prototype that never came to be?
Either way it's not in the TSS2 specs and so it has got to go.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Fixes: #679
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
The CreateLoaded implementation needs to take TPM2B_TEMPLATE type
instead of TPM2B_PUBLIC.
Fixes: #797
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
The bitfields are not used anymore.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Cleanup tss2_tpm2_types.h
Fixes: #675
Fixes: #735
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Currently the spec defines ABI version to TSS2_API_VERSION_1_2_1_108.
Update rest of the headers respectively.
Also some style cleanups and use C style comments instead of C++.
Fixes #674
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Add the recalculation of public names for response
authorization to NV_Increment and NV_SetBits.
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de>
|
|
This requires fixing a few of our deviations from the spec. Both the
device and socket TCTIs got the transmit function wrong. Fixing this
requires adding the `const` qualifier to the 3rd parameter. This
required the `send_checks` function prototype be updated as well.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
The spec uses a different naming convention (case only).
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
This is what's in the spec. The difference is academic.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
This requires fixing up some includes now that we don't benefit from the
pile of stuff included through tpm20.h. Took this opportunity to
rearrange the order of included files as well.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Minor cleanup.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
The spec has the 3rd parameter to the transmit function with the 'const'
qualifier. We were missing this and this patch resolves the API
breakage.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
This should never have been exposed through the public headers in the
first place.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
This function did some fancy stuff to marshal small integers into
UINT32s. It was only accepting UINT8s via the input parameter and then
storing them into the 3rd byte of a 4 byte buffer. This is what the type
marshalling library is for so we replace this with much less clever and
much more readable code.
This patch also replaces the use of 'recv' with 'read' since we weren't
doing anything with the flags / socket specific.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
This should have come out back when the new stuff in the log/log.h
was added.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Add support for TPM2_CCPolicyAuthorizeNV command.
Fixes #682
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
If it's not under $(srcdir)/include then it doesn't get installed on the
host. The file 'esys_types.h' is under $(srcdir)/esapi/include so it's
not installed but tss2_esys.h includes this file. This effectively
breaks the ESAPI headers but only when they're installed.
It seems like only esys_int.h gets broken when this is removed so the
include has been moved to this file instead.
Fuchs: Adapted to changed directory layout.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
|
|
Add support for esapi as code, include files and Makefiles
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de>
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
|
|
Add two new defines to TPM-Types that were introduced with TPM spec
1.38 and the corresponding latest TSS spec.
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
|
|
Add support for TPM2_CC_CreateLoaded command.
Fixes #861
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Add support for TPM2_CC_PolicyTemplate command.
Fixes #680
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
On windows this should be a HANDLE. This requires that we include
windows.h first.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Modify the source code to use #include "" so that the compiler
will look for the header locally prior to checking the system
include path.
Fixes: #687
Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
|
|
This is mechanically similar to the previous patch deprecating the old
init function from the device TCTI.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
We use the gcc 'deprecated' attribute to generate compiler warnings for
consumers building against this branch. This required some fixups in the
test harness were all references to the deprecated function are now
replaced by the Tss2_Tcti_Device_Init function. During the transiton
from the old to the new init functions we've had to define a private
version of the old function to alow its use internally through a
function that isn't marked as 'deprecated'.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
The common.h file should never be discovered through the system include
path. Only the TCTI headers should include this file and they should do
so using "" notation.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Update help string to reference the macro instead of the connection
string directly.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Update help string to reference the macro instead of the default device
path directly.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
The TSS2_ prefix is how the TCG specs attempt prevent conflicts with symbols
/ macros from other libraries / headers. Since this macro is in a public
header it should have this prefix.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
These are implementations of the common discovery / initialization
functions. Using dlopen, dlsym and the types / structures / constants
from the tss2_tcti.h header this allows for the socket TCTI to be
initialized and configured dynamically.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
These are implementations of the common discovery / initialization
mechanisms. Using dlopen, dlsym and the types / structures / constants
from the tss2_tcti.h header this allows for the device TCTI to be
initialized and configured dynamically.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
This should be sufficient to enable instatiation of a TSS2_TCTI_CONTEXT
structure by:
1) using the dynamic linker to dlopen a TCTI shared object
2) exstract the symbol to the `Tss2_Tcti_Info` function using dlsym
3) call the `Info` function to retrieve a reference to a static instance
of a TSS2_TCTI_INFO struct from the shared object
4) invoke the `Tss2_Tcti_Init` function through the pointer in the INFO
struct
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
If define as an array with 0 members this causes pedantic C compilers to
complain of the invalid 0 sized array (disallowed by c99).
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
These fields have been unused since
43a0d76bf4e8f50b164a8be89102f1de03d46fa6.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Update TCTI modules to new logging framework.
Removing the callback function for logging that were not
specification compliant.
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
|
|
According to ISO c99 additional semicolons outside of a function are not
allowed. When we use the TPM2B_TYPE2 macro (exclusively in
tss2_tpm2_types.h) we put a semicolon after it:
TPM2B_TYPE2( SENSITIVE_CREATE, TPMS_SENSITIVE_CREATE, sensitive );
With the macro as it was this would define the TPM2B_* structure like
so:
typedef struct {
UINT16 size;
type buffer_name;
} TPM2B_*;;
The two semicolons at the end of the typedef will cause a compiler
strictly adhearing to ISO c99 to complain:
./include/sapi/tss2_tpm2_types.h:1566:66: error: ISO C does not allow extra ‘;’ outside of a function
TPM2B_TYPE2( SENSITIVE_CREATE, TPMS_SENSITIVE_CREATE, sensitive );
Removing the semicolon from the definition of the TPM2B_TYPE2 macro
resolves this issue. Alternatively we could have removed the semicolon
from the locations where we call this macro. The approach taken in this
patch was chosen since it has a smaller impact on the code base (LOCs
changed).
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
|
|
Commit 090641a missed adding _complete functions to the header files
as well. This adds the _complete functions to the headers.
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
|
|
Add the missing const qualifier for Tss2_Sys_IncrementalSelfTest
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
|
|
Add SAPI functions for the TPM2_AC_GetCapability, TPM2_AC_Send,
and TPM2_Policy_AC_SendSelect commands.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Add marshaling functions for the Attached Component types.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|
|
Add support for the TPM2 Attached Component commands.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
|