blob: f0520801b8bdb5b95d62af95fb7b5105ef255a64 [file] [log] [blame]
Vadim Bendebury56797522015-05-20 10:32:25 -07001This repository contains source code derived from the TCG TPM 2.0 library
2specification
3
4(http://www.trustedcomputinggroup.org/resources/tpm_library_specification)
5
6The specification consists of four separate PDF files, two of them, part 3 and
7part 4 contain sample C code.
8
9To extract the C code from PDF files, first they were converted to text using
10the pdftotext utility available in poppler-utils Ubuntu package:
11
12pdftotext -eol unix -layout 'TPM/2.0/TPM Rev 2.0 Part 3 - Commands 01.16-code.pdf' part3.txt
13pdftotext -eol unix -layout 'TPM Rev 2.0 Part 4 - Supporting Routines 01.16-code.pdf' part4.txt
14
15A newline needed to be added to each of the text files to make sure the last
16function in the file is processed properly.
17
18echo >> part3.txt
19echo >> part4.txt
20
21Then the two scripts included in this directory for references were used to
22pull out code from the text files. The two files format source code
23differently, the easiest way to pull out the code is to use two different
24scripts:
25
26./parsep3 part3.txt
27./parsep4 part4.txt
28
29See LICENSE file for details.