Skip to content

Commit

Permalink
[PATCH] tpm: Fix pubek parsing
Browse files Browse the repository at this point in the history
Fix parsing of the PUBEK for display which was leading to showing the wrong
modulus length and modulus.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Kylene Jo Hall authored and Linus Torvalds committed Jun 25, 2005
1 parent daacdfa commit 1dda8ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr,
data[15], data[16], data[17], data[22], data[23],
data[24], data[25], data[26], data[27], data[28],
data[29], data[30], data[31], data[32], data[33],
be32_to_cpu(*((__be32 *) (data + 32))));
be32_to_cpu(*((__be32 *) (data + 34))));

for (i = 0; i < 256; i++) {
str += sprintf(str, "%02X ", data[i + 39]);
str += sprintf(str, "%02X ", data[i + 38]);
if ((i + 1) % 16 == 0)
str += sprintf(str, "\n");
}
Expand Down

0 comments on commit 1dda8ab

Please sign in to comment.