diff options
author | Sansar Choinyambuu <schoinya@hsr.ch> | 2011-12-18 18:36:36 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-12-18 18:36:36 +0100 |
commit | 6d3b46668f36231034a5a794474240e0dd4d95b6 (patch) | |
tree | 7cc8826a35a9c970014fb84006fb4751e24541a5 /src | |
parent | 005d981cc2e5c6247559cd196ee0c5cc4be2a750 (diff) | |
download | strongswan-6d3b46668f36231034a5a794474240e0dd4d95b6.tar.bz2 strongswan-6d3b46668f36231034a5a794474240e0dd4d95b6.tar.xz |
TrouSerS expects a bitmask field length of at least 3 bytes
Diffstat (limited to 'src')
-rw-r--r-- | src/libpts/pts/pts.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libpts/pts/pts.c b/src/libpts/pts/pts.c index 2f13ffce2..6469f7cc4 100644 --- a/src/libpts/pts/pts.c +++ b/src/libpts/pts/pts.c @@ -1155,7 +1155,11 @@ METHOD(pts_t, get_quote_info, bool, return FALSE; } - size_of_select = 1 + this->pcr_max / 8; + /** + * A TPM v1.2 has 24 PCR Registers + * so the bitmask field length used by TrouSerS is at least 3 bytes + */ + size_of_select = max(PCR_MAX_NUM / 8, 1 + this->pcr_max / 8); pcr_comp_len = 2 + size_of_select + 4 + this->pcr_count * this->pcr_len; writer = bio_writer_create(pcr_comp_len); |