Commit 1dda8abe authored by Kylene Jo Hall's avatar Kylene Jo Hall Committed by Linus Torvalds

[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: default avatarKylene Hall <kjhall@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent daacdfa6
...@@ -233,10 +233,10 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr, ...@@ -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[15], data[16], data[17], data[22], data[23],
data[24], data[25], data[26], data[27], data[28], data[24], data[25], data[26], data[27], data[28],
data[29], data[30], data[31], data[32], data[33], 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++) { 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) if ((i + 1) % 16 == 0)
str += sprintf(str, "\n"); str += sprintf(str, "\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment