diff options
author | Philipp Deppenwiese <zaolin@das-labor.org> | 2017-10-18 17:13:07 +0200 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2018-01-18 01:35:31 +0000 |
commit | 64e2d19082636de9e82674ccfca574269bb34712 (patch) | |
tree | dfe44c9b1cebbb611b99474c1ee096e23f930796 /src/lib/tpm2_marshaling.h | |
parent | 4fef7818ecd002e5971ea6287e402fd9276b7266 (diff) | |
download | coreboot-64e2d19082636de9e82674ccfca574269bb34712.tar.xz |
security/tpm: Move tpm TSS and TSPI layer to security section
* Move code from src/lib and src/include into src/security/tpm
* Split TPM TSS 1.2 and 2.0
* Fix header includes
* Add a new directory structure with kconfig and makefile includes
Change-Id: Id15a9aa6bd367560318dfcfd450bf5626ea0ec2b
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/22103
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/lib/tpm2_marshaling.h')
-rw-r--r-- | src/lib/tpm2_marshaling.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/lib/tpm2_marshaling.h b/src/lib/tpm2_marshaling.h deleted file mode 100644 index 5802044378..0000000000 --- a/src/lib/tpm2_marshaling.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2016 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#ifndef __SRC_LIB_TPM2_MARSHALING_H -#define __SRC_LIB_TPM2_MARSHALING_H - -#include <commonlib/iobuf.h> -#include "tpm2_tlcl_structures.h" - -/* The below functions are used to serialize/deserialize TPM2 commands. */ - -/** - * tpm_marshal_command - * - * Given a structure containing a TPM2 command, serialize the structure for - * sending it to the TPM. - * - * @command: code of the TPM2 command to marshal - * @tpm_command_body: a pointer to the command specific structure - * @ob: output buffer where command is marshaled to - * - * Returns 0 on success or -1 on error. - * - */ -int tpm_marshal_command(TPM_CC command, void *tpm_command_body, - struct obuf *ob); - -/** - * tpm_unmarshal_response - * - * Given a buffer received from the TPM in response to a certain command, - * deserialize the buffer into the expeced response structure. - * - * struct tpm2_response is a union of all possible responses. - * - * @command: code of the TPM2 command for which a response is unmarshaled - * @ib: input buffer containing the serialized response. - * - * Returns a pointer to the deserialized response or NULL in case of - * unmarshaling problems. - */ -struct tpm2_response *tpm_unmarshal_response(TPM_CC command, struct ibuf *ib); - -#endif // __SRC_LIB_TPM2_MARSHALING_H |