agent: add tpm specific functions
* agent/tpm2.c: New. * agent/Makefile.am (gpg_agent_SOURCES): Add new file. (gpg_agent_LDFLAGS): Add DL_LIBS. * agent/tpm2.h: New.
This commit adds code to handle the three specific functions needed to
make the agent TPM aware, namely the ability to load a key from shadow
information, the ability to sign a digest with that key, the ability
to decrypt with the key and the ability to import a key to the TPM.
The TPM2 is a bit of an esoteric beast, so all TPM specific callouts
are confined inside this code. Additionaly, it requires the tss2
library to function, so the code is designed such that if the library
isn't present then all TPM functions simply fail. This allows the
code to be compiled with TPM support, but not require that the support
library be present on the system.
- Added ChangeLog entries.
- Added DL_LIBS.
- Removed one -Wdeclaration-after-statement case.
- Signed-off-by: Werner Koch <wk@gnupg.org>