{"id":15780135,"url":"https://github.com/rgl/swtpm-vagrant","last_synced_at":"2026-02-07T15:03:55.722Z","repository":{"id":139753315,"uuid":"291822017","full_name":"rgl/swtpm-vagrant","owner":"rgl","description":"a vagrant environment to play with swtpm","archived":false,"fork":false,"pushed_at":"2022-06-19T09:31:00.000Z","size":26,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-13T23:39:27.169Z","etag":null,"topics":["swtpm","tpm","tpm2"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-31T20:51:28.000Z","updated_at":"2024-08-12T17:10:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"892f5175-22c1-4095-936d-c75e2f9b17ce","html_url":"https://github.com/rgl/swtpm-vagrant","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rgl/swtpm-vagrant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fswtpm-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fswtpm-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fswtpm-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fswtpm-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgl","download_url":"https://codeload.github.com/rgl/swtpm-vagrant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fswtpm-vagrant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29197669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["swtpm","tpm","tpm2"],"created_at":"2024-10-04T18:40:39.086Z","updated_at":"2026-02-07T15:03:55.686Z","avatar_url":"https://github.com/rgl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\n[![Build status](https://github.com/rgl/swtpm-vagrant/workflows/build/badge.svg)](https://github.com/rgl/swtpm-vagrant/actions?query=workflow%3Abuild)\n\nThis is a vagrant environment to play with [swtpm](https://github.com/stefanberger/swtpm) (a [Trusted Platform Module (TPM)](https://en.wikipedia.org/wiki/Trusted_Platform_Module) emulator) inside a qemu/kvm VM.\n\nThe swtpm binaries packages are used at [rgl/tpm-go-attestation-vagrant](https://github.com/rgl/tpm-go-attestation-vagrant).\n\n# Usage\n\nIf you want to use the binary packages execute:\n\n```bash\n# enter a root shell.\nsudo -i\n\n# install the binaries.\nmkdir -p tmp\nwget -qO tmp/swtpm-packages.tgz https://github.com/rgl/swtpm-vagrant/releases/download/v0.0.20220619/swtpm-packages.tgz\npackages_path='/opt/apt/repo.d/swtpm'\nrm -rf $packages_path \u0026\u0026 install -d $packages_path\ntar xf tmp/swtpm-packages.tgz -C $packages_path\nbash -c \"echo \\\"deb [trusted=yes] file:$packages_path ./\\\" \u003e/etc/apt/sources.list.d/swtpm.list\"\napt-get update\napt-get install -y swtpm swtpm-tools\ninstall -d -o tss -g tss -m 755 /var/lib/swtpm-localca\n\n# create the swtpm localca.\n# NB the localca is created as a side-effect of creating a dummy swtpm instance\n#    based on the configuration files at /etc/swtpm* (installed by the\n#    swtpm-tools package).\nTPMSTATE=tmp/tpmstate\ninstall -d \"$TPMSTATE\"\nswtpm_setup \\\n    --tpm2 \\\n    --tpmstate \"$TPMSTATE\" \\\n    --create-ek-cert \\\n    --create-platform-cert \\\n    --lock-nvram\nchown -R tss:tss /var/lib/swtpm-localca\nrm -rf \"$TPMSTATE\"\n\n# exit the root shell.\nexit\n```\n\nIf you want to build them yourself follow the next section.\n\n# Build\n\nInstall the base [Ubuntu 20.04 base box](https://github.com/rgl/ubuntu-vagrant).\n\nLaunch the environment:\n\n```bash\nvagrant up --no-destroy-on-error\n```\n\nThen follow the output instructions to launch a nested VM and\nplay with its TPM.\n\n## Packages\n\nAfter `vagrant up` the packages are copied to the `tmp/swtpm-packages.tgz` host file.\n\nYou can install them as described in the usage section (skip the download part).\n\n## vagrant-libvirt\n\nInstall the swtpm packages as described above.\n\nConfigure your `Vagrantfile` to [automatically create an emulated TPM for the VM](https://github.com/vagrant-libvirt/vagrant-libvirt#tpm-devices).\n\n# References\n\n* [Trusted Platform Module (Wikipedia)](https://en.wikipedia.org/wiki/Trusted_Platform_Module)\n* [Trusted Platform Module (Arch Linux)](https://wiki.archlinux.org/index.php/Trusted_Platform_Module)\n* [tpm-js (experiment with a software Trusted Platform Module (TPM) in your browser)](https://google.github.io/tpm-js/)\n* [QEMU TPM Device](https://www.qemu.org/docs/master/specs/tpm.html)\n* [The QEMU TPM emulator device](https://www.qemu.org/docs/master/specs/tpm.html#the-qemu-tpm-emulator-device)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fswtpm-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgl%2Fswtpm-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fswtpm-vagrant/lists"}