]>
Commit | Line | Data |
---|---|---|
a0098eda CB |
1 | This document contains the following sections: |
2 | ============================================== | |
3 | ||
4 | - Building libtpms | |
5 | - Installing libtpms, include files and manpages | |
6 | - Uninstalling libtpms, include files and manpages | |
7 | - Installation and uninstallation of libtpms manpages only | |
8 | ||
9 | ||
10 | Building libtpms: | |
11 | ----------------- | |
12 | ||
13 | Building libtpms can be done using | |
14 | ||
15 | make -f makefile-libtpms clean all | |
16 | ||
17 | This generates the dynamic link library and symbolic links to the library | |
18 | and places it in the same directory where the sources are. | |
19 | ||
20 | lrwxrwxrwx 1 root root 12 Feb 2 19:11 libtpms.so -> libtpms.so.0 | |
21 | lrwxrwxrwx 1 root root 16 Feb 2 19:11 libtpms.so.0 -> libtpms.so.0.5.1 | |
22 | -rwxrwxr-x 1 root root 1489596 Feb 2 19:11 libtpms.so.0.5.1 | |
23 | ||
24 | The library is known to build on Linux and Cygwin systems and possible | |
25 | other Operating Systems that use .so as library extensions. | |
26 | ||
27 | On Linux systems, libtpms can be built with either one of the following | |
28 | crypto backends: | |
29 | ||
30 | - openssl | |
31 | - freebl | |
32 | ||
33 | On Cygwin only openssl is available and therefore can only be built with | |
34 | openssl. | |
35 | ||
36 | To build for openssl, the following development packages must have been | |
37 | installed: | |
38 | ||
39 | - glibc-headers | |
40 | - openssl-devel | |
41 | ||
42 | To build for freebl, the following development packages must have been | |
43 | installed prior to compilation: | |
44 | ||
45 | - glibc-headers | |
46 | - nss-softokn-freebl-devel (preferably version 3.12.9-2 or newer) | |
47 | - nss-softokn-devel (preferably version 3.12.9-2 or newer) | |
48 | - gmp-devel | |
49 | ||
50 | By default, libtpms is built with the openssl crypto library, which was | |
51 | shown above. To build with the freebl crypto library the following command | |
52 | line can be used | |
53 | ||
54 | make -f makefile-libtpms CRYPTO_SUBSYSTEM=freebl clean all | |
55 | ||
56 | To verify that libtpms was built with freebl as the crypto backend, one | |
57 | can run | |
58 | ||
59 | ldd libtpms.so | |
60 | ||
61 | linux-vdso.so.1 => (0x00007fff8d5ff000) | |
62 | libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00007f5352a13000) | |
63 | libnspr4.so => /lib64/libnspr4.so (0x00007f53527d6000) | |
64 | libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f53525b6000) | |
65 | libnss3.so => /usr/lib64/libnss3.so (0x00007f535227c000) | |
66 | libc.so.6 => /lib64/libc.so.6 (0x00007f5351ed8000) | |
67 | libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5351cba000) | |
68 | libdl.so.2 => /lib64/libdl.so.2 (0x00007f5351ab6000) | |
69 | libplc4.so => /lib64/libplc4.so (0x00007f53518b2000) | |
70 | libplds4.so => /lib64/libplds4.so (0x00007f53516ae000) | |
71 | /lib64/ld-linux-x86-64.so.2 (0x0000003a1c000000) | |
72 | ||
73 | The fact that the libraries libgmp, libnspr4, libnssutil3, libnss3, | |
74 | libpc4, and libplds4 are linked agaist is an indication that the freebl | |
75 | library was used for linking. | |
76 | ||
77 | In case of openssl's libcrypto the output would be the following | |
78 | ||
79 | linux-vdso.so.1 => (0x00007fffcbdff000) | |
80 | libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fdb1d00e000) | |
81 | libc.so.6 => /lib64/libc.so.6 (0x00007fdb1cc6a000) | |
82 | libdl.so.2 => /lib64/libdl.so.2 (0x00007fdb1ca65000) | |
83 | libz.so.1 => /lib64/libz.so.1 (0x00007fdb1c84e000) | |
84 | /lib64/ld-linux-x86-64.so.2 (0x0000003a1c000000) | |
85 | ||
86 | ||
87 | A debug build that prints out __lots__ of debugging information on the | |
88 | TPM level can be built by invoking make as follows: | |
89 | ||
90 | make -f makefile-libtpms CRYPTO_SUBSYSTEM=freebl BUILD_TYPE=debug | |
91 | ||
92 | ||
93 | Installing libtpms, include files and manpages: | |
94 | ----------------------------------------------- | |
95 | ||
96 | The installation of libtpms, the development include files (headers) and | |
97 | man pages can be achieved through: | |
98 | ||
99 | make -f makefile-libtpms install | |
100 | ||
101 | This will copy libtpms into the standard library directory on your Linux | |
102 | system such as /usr/lib or /usr/lib64, depending on whether you built for | |
103 | a 32 bit or 64 bit machine. | |
104 | ||
105 | The public include files of libtpms will be copied to /usr/include/libtpms. | |
106 | ||
107 | The man pages explaining the libtpms API will be copied to /usr/share/man. | |
108 | ||
109 | ||
110 | ||
111 | Uninstalling libtpms, include files and manpages: | |
112 | ------------------------------------------------- | |
113 | ||
114 | The libtpms library, its development include files (headers) and man pages | |
115 | can be uninstalled from their standard locations using | |
116 | ||
117 | make -f makefile-libtpms uninstall | |
118 | ||
119 | ||
120 | Installation and uninstallation of libtpms man pages only: | |
121 | ---------------------------------------------------------- | |
122 | ||
123 | All API calls of libtpms have a man page. The man pages can be separately | |
124 | installed using | |
125 | ||
126 | make -f makefile-libtpms manpages-install | |
127 | ||
128 | and uninstalled using | |
129 | ||
130 | make -f makefile-libtpms manpages-uninstall | |
131 | ||
132 | ||
133 | If the man pages are not installed into the standard man pages directory | |
134 | the can then be looked at using | |
135 | ||
136 | man -M ./man TPMLIB_MainInit | |
137 | ||
138 | from the TPM's source directory that contains the 'man' directory. | |
139 | ||
140 | The man pages contain explanations on how to use the API as well as examples. |