This is sample code for a TCG attestation application. It supports TPM 2.0 and TPM 1.2. It includes 5 main pieces:
1 - An attestation server
2 - An attestation client that pushes quotes to the server
3 - An enrollment client that enrolls a signing key with the server
4 - A utility to provision an EK certificate on a SW TPM for testing
5 - Demo php code to display results
The code is C, with json formatting at the client / server interface. Mysql is used for data storage...