Split-out those TPM 2 command functions that need to be adapted due to the
functions they call returning an error code. Split them out into their own
files so they can be synchronized easier.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Split-out those TPM 2 command functions that need to be adapted due to the
functions they call returning an error code. Split them out into their own
files so they can be synchronized easier.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Resolve only white space changes on a previously applied patch resolving a
CVE where my version looked slightly different.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Remove the TABLE_DRIVEN_DISPATCH build switch that was set to 'YES'.
Remove code that assumed it to be set to 'NO'.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Upstream has gotten rid of the IS_IMPLEMENTED flag but upstream is also
using compressed lists where each element in the command lists represents
an implemented command. Libtpms does not use compressed lists but we may
have a list with gaps in it due to unimplemented commands where this flag
may be the only one set and help identify an implemented command. However,
since profiles indicate enablement and implementation of commands, and
nearly all tests for the IS_IMPLEMENTED flag are paired with a check on
the profile with RuntimeCommandsCheckEnabled(), we can get rid of tests for
IS_IMPLEMENTED and finally the flag altogether since it is redundant.
Also get rid of NOT_IMPLEMENTED flag that was not used anywhere.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Now that Helpers.c is clean of contributions, change its license to
BSD-2-clause. Change license in some other files as well.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Remove the contributed conditional compilation of a TDES related function
and fields in a structure based on definition of ALG_TDES.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Implement the retrieval of the updated IV in a single function which is
to be called after a symmetric key encryption or decryption operation.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
To get some files into the state so that they can be easily replaced with
the BSD-licensed code, revert:
- spelling changes that were introduced by nicolas.iooss@ledger.fr in
bbd7b75d71. Many of the changes introduced in that change were replaced
in subsequence changes with the original spelling errors in the upstream
code.
- LibreSSL support introduced by orbea <orbea@riseup.net> in 95fff22c9b
and 7310725524.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
TPM_WINDOWS is not set anywhere in the build system and therefore assumed
to not be used. We can get rid of whatever assumed it may have been set.
Also rool back some other changes to Windows-specific code.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reduce the diff with upstream by removing the usage of variable 'irc' and
apply the assert right to the fseek statement.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>