A simple WebSocket server capable of querying the Trusted Platform Module (TPM).
This just connects three excellent projects:
- TooTallNate's Java WebSocket Server - https://github.com/TooTallNate/Java-WebSocket
- The JSR321 reference implementation by IAIK Tu Graz for using the TPM - http://java.net/projects/jsr321/
- The GSon library for converting between Java and JSON - https://sites.google.com/site/gson/
This module depends on code from the above three projects, as well as the IAIK JTSS 0.7a ( http://trustedjava.sourceforge.net/index.php?item=jtss/readme ).
I suggest creating this kind of directory structure:
websocket-tpm ├── bin ├── build.xml ├── ext_lib │ ├── gson │ │ └── gson-2.2.2.jar │ ├── Java-WebSocket │ │ └── java_websocket.jar │ ├── jsr321-api │ │ └── jsr321.jar │ ├── jsr321-ri │ │ └── jsr321-ri.jar │ └── jtss_0.7a │ ├── ext_libs ... │ └── lib ... ├── LICENSE.txt ├── README.md ├── src └── test-src
Note that "jtss_0.7a/lib" and "jtss_0.7a/ext_lib" ought to point to the respective directories in the jtss installation, with all their dependencies. See the build.xml for more details.
Just run 'ant' from the websocket-tpm directory.
Run 'ant TpmWebSocketServer'
This will launch the server on port 5050.
You can then use the 'test-src/browserTest.html' file to see what you can do with it. Which is not very much, at the moment.