mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-26 12:26:11 +00:00
f8c54e1ac4
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>
19 lines
521 B
C
19 lines
521 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef _LINUX_ASYM_TPM_SUBTYPE_H
|
|
#define _LINUX_ASYM_TPM_SUBTYPE_H
|
|
|
|
#include <linux/keyctl.h>
|
|
|
|
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);
|
|
|
|
extern struct asymmetric_key_subtype asym_tpm_subtype;
|
|
|
|
#endif /* _LINUX_ASYM_TPM_SUBTYPE_H */
|