{"id":20009032,"url":"https://github.com/linuxkit/mirror-trousers","last_synced_at":"2025-08-22T06:18:57.220Z","repository":{"id":70310135,"uuid":"140461606","full_name":"linuxkit/mirror-trousers","owner":"linuxkit","description":"A mirror of https://git.code.sf.net/p/trousers/trousers","archived":false,"fork":false,"pushed_at":"2018-07-10T16:45:41.000Z","size":3256,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T01:43:08.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linuxkit.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-10T16:43:09.000Z","updated_at":"2018-07-10T16:45:34.000Z","dependencies_parsed_at":"2023-02-27T05:00:19.703Z","dependency_job_id":null,"html_url":"https://github.com/linuxkit/mirror-trousers","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/linuxkit/mirror-trousers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fmirror-trousers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fmirror-trousers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fmirror-trousers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fmirror-trousers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxkit","download_url":"https://codeload.github.com/linuxkit/mirror-trousers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Fmirror-trousers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271594386,"owners_count":24786711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T07:13:49.754Z","updated_at":"2025-08-22T06:18:57.163Z","avatar_url":"https://github.com/linuxkit.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"trousers README\n\n  Trousers is an open-source TCG Software Stack (TSS), released under\nthe BSD License. Trousers aims to be compliant with the\n1.1b and 1.2 TSS specifications available from the Trusted Computing\nGroup website:\n\nhttp://www.trustedcomputinggroup.org\n\n\nCONTACT\n\n  For information on the TrouSerS project, please send mail to the\nfollowing lists:\n\nUse of the TSS API and TrouSerS:\n  trousers-users@lists.sf.net\n\nDiscussion of the internals of the TrouSerS implementation:\n  trousers-tech@lists.sf.net\n\nPossibly sensitive security related bugs:\n  Hon Ching(Vicky) Lo \u003chonclo@linux.vnet.ibm.com\u003e\n\nRun-of-the-mill bug reports should use the TrouSerS bug tracker:\n  http://sourceforge.net/tracker/?group_id=126012\u0026atid=704358\n\n\nBUILD REQUIREMENTS\n\n  Packages needed to build:\n\n  automake \u003e 1.4\n  autoconf \u003e 1.4\n  pkgconfig\n  libtool\n  gtk2-devel\n  openssl-devel \u003e= 0.9.7\n  pthreads library (glibc-devel)\n\n\nBUILDING the TSS 32-bit\n\n  Build and install the latest TPM device driver from\nsf.net/projects/tpmdd either compiled in or loaded as a\nmodule. UPDATE: This driver is now included in the vanilla 2.6.12\nkernel!  If you are doing this, trousers should just work after a\nvanilla build. Follow the build instructions below and read\nRUNNING the TSS, below.\n\n  To build trousers after you have the device driver installed:\n\n  $ sh bootstrap.sh\n  $ ./configure [--enable-debug] [--enable-gprof] [--enable-gcov]\n  $ make\n  # make install\n\n  Here are the default locations of files that trousers installs:\n\n  /usr/local/sbin/tcsd\n  /usr/local/etc/tcsd.conf\n  /usr/local/lib/libtspi.so.0.0.X\n  /usr/local/lib/libtspi.so.0 -\u003e libtspi.so.0.0.X\n  /usr/local/lib/libtspi.so -\u003e libtspi.so.0.0.X\n  /usr/local/lib/libtspi.la\n  /usr/local/lib/libtddl.a\n  /usr/local/var/lib/tpm\n\n  By default the build will place everything in /usr/local. To install\nin a slightly more predictable place, use `./configure --prefix=/usr`.\n\n  'make install' will run ldconfig, but if /usr/local/lib is not in\nyour /etc/ld.so.conf, this won't make a difference. You may need to\nmanually add it and run ldconfig as root to allow your apps to link at\nrun time to libtspi.so.\n\n\nBUILDING the TSS 64-bit\n\n  TrouSerS has been built and tested on ppc64 and x86_64, so please\ndon't hesitate to report bugs on these platforms.  Building everything\n64-bit will require a few more flags than are necessary for a 32-bit\nplatform.  Here are some example instructions for ppc64:\n\n  $ sh bootstrap.sh\n  $ export PKG_CONFIG_PATH=/usr/lib64/pkgconfig\n  $ CFLAGS=\"-L/usr/lib64 -L/opt/gnome/lib64\" LDFLAGS=\"-L/usr/lib64 \\\n           -L/opt/gnome/lib64\" ./configure --libdir=\"/usr/local/lib64\"\n  $ make\n  # make install\n\n  Hopefully the above example will get you going on building in your\n64-bit environment.  If you need to do anything special, please send\nyour build steps to trousers-users@lists.sf.net and I'll include it\nhere.\n\n\nUSING TROUSERS ON AN ALREADY OWNED TPM\n\n  If you've already taken ownership of your TPM using a TSS under another\noperating system, there are a few issues you should be aware of.\n\n  Auth vs No-Auth SRK:  In order to trick trousers into thinking it has taken\nownership of the TPM it's running on, you will need to create a persistent\nstorage file for trousers to use.  Normally trousers would create this file\nitself at the time ownership is taken.  If your SRK has been given an\nauthorization password by the non-Linux OS, you will need to move the file\ndist/system.data.auth to /usr/local/var/lib/tpm/system.data.  If you've\ntaken ownership of your TPM without issuing a password, move\ndist/system.data.noauth to /usr/local/var/lib/tpm/system.data.\n\n  Passwords:  When entering passwords for keys you'd like to use in both\nLinux and other OS's, you'll need to take note of how you entered those\npasswords.  The TSS spec states that when a password is entered through a\nGUI popup dialog box provided by the TSS library, the password should be\nconverted to the UTF-16 encoding and then hashed using SHA-1, including\nthe UTF-16 null terminator in the hash calculation.\n\n  In order to work around this problem, specify the -u option to the\ntpm-tools command line to convert the password to UTF-16 before hashing.\nThis, however, unfolds yet another problem...\n\n  Some TSS stacks aren't compliant with the TSS spec, in that they hash\ntheir passwords without including the terminating null character.  This\nmeans that there are effectively two versions of any password set through\na popup dialog box.  Trousers will include the terminating null character\nin its hashes of UTF-16 data.\n\n  We'll do our best to track other TSS software and how it behaves.  Please\nsee the trousers FAQ at http://trousers.sf.net for more information.\n\n\nARCHITECTURE\n\n  This TSS implementation has several components.\n\n  A) The TCS Daemon - A user space daemon that should be (according to\n     the TSS spec) the only portal to the TPM device driver. At boot\n     time, the TCS Daemon should be started, it should open the TPM\n     device driver and from that point on, all requests to the TPM\n     should go through the TSS stack. The TCSD manages TPM resources\n     and handles requests from TSP's both local and remote.\n\n  B) The TSP shared library - The TSP (TCG Service Provider) is a\n     shared library that enables applications to talk to TCSD's both\n     locally and remotely. The TSP also manages resources used in\n     commicating with the application and the TCSD and transparently\n     contacts the TCSD whenever necessary.\n\n  C) Persistent Storage (PS) files - TSS's have 2 different kinds of\n     PS for keys.  PS can be thought of as a database for keys, with\n     each key in the database indexed by a UUID.\n\n     'User' persistent storage is maintained by the application's TSP\n     library.  Upon writing the first key to User PS, the TSP library\n     creates a new file at ~/.trousers/user.data, using the effective\n     user id of the process executing the call to find ~. An environment\n     variable, TSS_USER_PS_FILE, can also be set to point the TSP library\n     to a different location for the User PS. This environment variable\n     has the lifetime of the TSP context, so to store 2 keys in 2\n     different files, you will need to call Tspi_Context_Close, set the\n     new location, and open the context again.\n\n     'System' persistent storage is controlled by the TCS and stays\n     valid across all application lifetimes, TCSD restarts and system\n     resets. Data registered in system PS stays valid until an application\n     requests that it be removed. The System PS file by default is\n     /usr/local/var/lib/tpm/system.data. The system PS file is initially\n     created when ownership of the TPM is first taken.\n\n  D) A config file. By default located in /usr/local/etc/tcsd.conf.\n\n\nRUNNING the TSS\n\n  By default, the TCS daemon is not reachable over the internet, so if\nyou just plan to access it locally, running it as root with a root owned\ndevice node is probably ok.  Just make sure your device driver is loaded\nand start the tcsd as root.\n\n  If you would like to run the TCS daemon as an unprivleged user,\nplease follow these instructions:\n\n  If you're using the device driver from a linux 2.6.12+ kernel and have\nudev enabled, you need to add the following line to your\nudev.permissions file (usually in /etc/udev somewhere):\n\n  tpm[0-9]:tss:tss:0600\n\n  and then just load the device driver with:\n  # modprobe tpm_atmel\n  or,\n  # modprobe tpm_natl\n\n  start the TCS Core Services daemon, by default /usr/local/sbin/tcsd.\n  # /usr/local/sbin/tcsd\n\n  If you're attempting to make the TCS Core Services daemon communicate with a\nsoftwware TPM through TCP, you must call it using the -e option. \n\n  # /usr/local/sbin/tcsd -e\n\n  The default values for hostname, port and UN socket device path are  \"localhost\", \n\"6545\" and \"/var/run/tpm/tpmd_socket:0\". It will search for the IN socket device,\nthen for an UN socket one, and then for the real TPM in this order.\nThe default values match with the current open source project required values, if\nfor instance case you need to set values of your choice, the environment variables \nfor them are TCSD_TCP_DEVICE_HOSTNAME, TCSD_TCP_DEVICE_PORT if using an IN socket \nand TCSD_UN_SOCKET_DEVICE_PATH if running an UN socket.\n\n\nDEBUGGING\n\n  If you've compiled trousers with './configure --enable-debug' and would like\nto turn debugging output off at run-time, set the environment variable\nTSS_DEBUG_OFF to any value.\n\n\nBUILDING a TSS RPM\n\n # sh bootstrap.sh\n # ./configure\n # cd ..\n # mv trousers trousers-${version}\n # tar zcvf /usr/src/packages/SOURCES/trousers-${version}.tar.gz \\\n            trousers-${version}\n # rpmbuild -bb trousers-${version}/dist/trousers.spec\n\nEOF\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxkit%2Fmirror-trousers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxkit%2Fmirror-trousers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxkit%2Fmirror-trousers/lists"}