summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2018-10-09 17:48:10 +0100
committerJames Morris <james.morris@microsoft.com>2018-10-26 09:30:46 +0100
commitf8c54e1ac4b82933dfcf88c37892da8ae35ccbe4 (patch)
tree9f11437c13e8e27429e009ab8d0481b07196d15c /include/crypto
parent903be6bb84c544551150a6f5aab9fda1ed9a6895 (diff)
downloadlinux-f8c54e1ac4b82933dfcf88c37892da8ae35ccbe4.tar.bz2
KEYS: asym_tpm: extract key size & public key [ver #2]
The parsed BER/DER blob obtained from user space contains a TPM_Key structure. This structure has some information about the key as well as the public key portion. This patch extracts this information for future use. Signed-off-by: Denis Kenzior <denkenz@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Marcel Holtmann <marcel@holtmann.org> Reviewed-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/asym_tpm_subtype.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/crypto/asym_tpm_subtype.h b/include/crypto/asym_tpm_subtype.h
index 03550b850998..48198c36d6b9 100644
--- a/include/crypto/asym_tpm_subtype.h
+++ b/include/crypto/asym_tpm_subtype.h
@@ -7,6 +7,9 @@
struct tpm_key {
void *blob;
u32 blob_len;
+ uint16_t key_len; /* Size in bits of the key */
+ const void *pub_key; /* pointer inside blob to the public key bytes */
+ uint16_t pub_key_len; /* length of the public key */
};
struct tpm_key *tpm_key_create(const void *blob, uint32_t blob_len);