Computer and Network Security Group  
Torsec logo and link to home page TORSEC

TrouSerS for Windows

Politecnico di Torino logo and link to home page
projects publications thesis members contact us

TrouSerS for Windows Vista and Windows 7

The open source TCG Software Stack (TSS) ... now for Windows Vista and Windows 7!

The lack of an open source TSS for Windows is a pain for many developers and researchers. In order to fill this gap, we ported TrouSerS to Windows.

Currently it is only a partial porting which runs on Windows Vista and Windows 7. We were able to compile it natively under Windows using Microsoft Visual Studio and to cross-compile it from a Fedora Linux using MinGW.

We are working to enhance it for full compatibility with upstream TrouSerS.

Download

This work is released with the same licence as TrouSerS.

Download the Windows installer (see instructions below)

Download the source:

Changelog

(20111017) improved description on building TrouSerS using MS Visual Studio

(20101105) patch for TrouSerS 0.3.6

(20100916) patch for TrouSerS 0.3.4

Current Limitations

Currently this porting has the following limitations:

TrouSerS for Windows is tested on Windows Vista and Windows 7. Previous versions of Windows are not supported because this work is based on the TPM Base Services.

Windows Installer

Working with the patch

MS Visual Studio

Prerequisites

In order to build this software with MS Visual Studio you will need:

If anyone succeeds to run it on other versions of the software and libraries, feel free to report.

Building TrouSerS for Windows (with Visual Studio)

For building TrouSerS using MS Visual Studio:

Testing TrouSerS for Windows

For testing TrouSerS:

MinGW

Building TrouSerS for Windows (with MinGW)

TODO

Cross-compiling TrouSerS for Windows from Linux

We tested it on Fedora Core 12 and installed the following packages:

(OK, some of them may be not necessary. If you find which are the strictly necessary ones, please report it ;-)

You also need tbs.lib in the path /path/to/mingw/sys-root/mingw/bin (distributed with Visual Studio and MSDN SDK). In order to obtain this file without installing the SDK you must follow these steps:

  1. extract all the content for our distributed tarball in the working directory WORKINGDIR;
  2. pick the file tbs.dll from C:\Windows\System32 in your Windows partition and copy it in WORKINGDIR; (be sure to obtain the 32 bit version of the DLL)
  3. execute: cd WORKINGDIR
  4. execute: cp trouserswin/dist/tbs.def .
  5. execute: /path/to/mingw/bin/dlltool -U --export-all-symbols -d tbs.def -D tbs.dll -l tbs.lib
  6. execute: cp tbs.lib /path/to/mingw/sys-root/mingw/lib
  7. execute: cp trouserswin/dist/tbs.h /path/to/mingw/sys-root/mingw/include

At this point you are ready to start the cross-compilation procedure.

First, you must cross-compile OpenSSL for Windows:

  1. Follow the instructions in file openssl/INSTALL.W32 for MinGW ;-)

Then, you can cross-compile TrouSerS for Windows:

  1. cd WORKINGDIR/trouserswin
  2. mingw32-configure [--enable-debug] [--prefix=/path/to/mingw/sys-root/mingw]
  3. mingw32-make
  4. mingw32-make install (mainly needed for installing libraries for future application cross-compilation)

After the procedure is done you have obtained the TSP interface library libtspi.dll.a which is located in /path/to/mingw/sys-root/mingw/lib and the TSP DLL libtspi-1.dll which is located in /path/to/mingw/sys-root/mingw/bin.

The file libtspi-1.dll must be placed in your Windows partition in C:\Windows\System32 or in the same directory you will run the compiled application.

Finally, if you want to cross-compile an application for Windows using TrouSerS, you must use the following command:

/usr/bin/i686-pc-mingw32-gcc -o yourapp.exe yourapp.c -ltspi [additional LDFLAGS].

Testing TrouSerS for Windows

Feedback

For any feedback or comment, please write us at the following addresses:


Last modified on Monday, 17-Oct-2011 16:11:02

Powered by Apache Valid CSS Valid HTML 4.01 Transitional