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

stefanberger / libtpms / 2055
77%

Build:
DEFAULT BRANCH: master
Ran 18 Jun 2021 02:12PM UTC
Jobs 1
Files 457
Run time 1min
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
2055

cron

travis-ci-com

stefanberger
tpm2: Consume padding bytes in TPM2_ContextLoad() (Win2k19, issue #217)

Windows 2019 Server padds the TPM_ContextLoad() command with additional
bytes up to TPM_PT_MAX_OBJECT_CONTEXT for the TPMS_CONTEXT part. Since
libtpms does not use an OBJECT to serialize the keys (anymore) it now
uses less bytes than the MAXimum of TPM_PT_MAX_OBJECT_CONTEXT bytes and
the padding leaves some unconsumed bytes that end up failing the command
since no left-over bytes are allowed in any command.

When unconsumed bytes are left in TPMS_CONTEXT_Unmarshal() we check that
the original passed in size was that of TPM_PT_MAX_OBJECT_CONTEXT and
only then consume the additional padding bytes. Luckily only one command
calls TPMS_CONTEXT_Unmarshal() so that no unwanted side effects should
occur anywhere else, such as no bytes left for unmarshalling the next
structure.

The wisdom behind the padding is not quite clear but it feels like
ill-fixing the code to work around a Windows 2019 server bug...

This patch fixes issed #217

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

9 of 9 new or added lines in 1 file covered. (100.0%)

29051 of 37489 relevant lines covered (77.49%)

93290.68 hits per line

Jobs
ID Job ID Ran Files Coverage
2 2055.2 (COVERITY_SCAN_TOKEN=[secure] CONFIG="--with-openssl --prefix=/usr --with-tpm2 --enable-test-coverage" TARGET="install" NPROC="nproc") 18 Jun 2021 02:12PM UTC 0
77.49
Travis Job 2055.2
Source Files on build 2055
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #2055
  • be5fabf1 on github
  • Prev Build on master (#2053)
  • Next Build on master (#2067)
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