• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stefanberger / libtpms / 1875
77%

Build:
DEFAULT BRANCH: master
Ran 24 Feb 2021 12:24PM UTC
Jobs 1
Files 455
Run time 55s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1875

push

travis-ci-com

stefanberger
tpm2: Test RSA private keys when -DDO_CHECK_RSA_KEY=1 is used

For some peace-of-mind add a function that allows us to check the RSA keys
that are generated, especially the primary keys that are not generated by
OpenSSL.

Use the following configure line to compile libtpms:

CFLAGS="-DDO_RSA_CHECK_KEY=1" ./autogen.sh --prefix=/usr \
  --with-tpm2 --with-openssl

Start swtpm after installing libtpms:

swtpm socket --tpmstate dir=/tmp/myvtpm --tpm2 --ctrl type=tcp,port=2322  \
  --server type=tcp,port=2321 --flags not-need-init --log level=0

We can now run this test program to check keys by using an RSA primary key
for signing.

export TPM_COMMAND_PORT=2321 TPM_PLATFORM_PORT=2322 \
  TPM_SERVER_NAME=localhost TPM_INTERFACE_TYPE=socsim \
  TPM_SERVER_TYPE=raw

echo "test" > input

swtpm_ioctl --tcp :${TPM_PLATFORM_PORT} -i
tssstartup

while :; do
  for keysize in 2048 3072; do

    tsscreateprimary -rsa $keysize -si -hi n
    tsssign -hk 80000000 -if input
    tssflushcontext -ha 80000000
  done
done

Libtpms has passed multiple hours of testing.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

28936 of 37389 relevant lines covered (77.39%)

89947.88 hits per line

Jobs
ID Job ID Ran Files Coverage
2 1875.2 (COVERITY_SCAN_TOKEN=[secure] CONFIG="--with-openssl --prefix=/usr --with-tpm2 --enable-test-coverage" TARGET="install" NPROC="nproc") 24 Feb 2021 12:24PM UTC 0
77.39
Travis Job 1875.2
Source Files on build 1875
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1875
  • 6905e8a2 on github
  • Prev Build on master (#1870)
  • Next Build on master (#1878)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc