aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.c
diff options
context:
space:
mode:
authorKylene Jo Hall <kjhall@us.ibm.com>2005-06-25 17:55:40 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:38 -0400
commit1dda8abe6feb906306a627b170654ddd8addcdac (patch)
treec8ce530b74ff7ceda61df8ff7af37082c07dca82 /drivers/char/tpm/tpm.c
parentdaacdfa6e7d6e57c5d1b8e72b1c863feb53d8a82 (diff)
[PATCH] tpm: Fix pubek parsing
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>
Diffstat (limited to 'drivers/char/tpm/tpm.c')
-rw-r--r--drivers/char/tpm/tpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index 5c843c9bf819..1156d11f02d9 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -233,10 +233,10 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr,
233 data[15], data[16], data[17], data[22], data[23], 233 data[15], data[16], data[17], data[22], data[23],
234 data[24], data[25], data[26], data[27], data[28], 234 data[24], data[25], data[26], data[27], data[28],
235 data[29], data[30], data[31], data[32], data[33], 235 data[29], data[30], data[31], data[32], data[33],
236 be32_to_cpu(*((__be32 *) (data + 32)))); 236 be32_to_cpu(*((__be32 *) (data + 34))));
237 237
238 for (i = 0; i < 256; i++) { 238 for (i = 0; i < 256; i++) {
239 str += sprintf(str, "%02X ", data[i + 39]); 239 str += sprintf(str, "%02X ", data[i + 38]);
240 if ((i + 1) % 16 == 0) 240 if ((i + 1) % 16 == 0)
241 str += sprintf(str, "\n"); 241 str += sprintf(str, "\n");
242 } 242 }