1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /***********************************************************************; 3 * Copyright (c) 2015 - 2018, Intel Corporation 4 * All rights reserved. 5 ***********************************************************************/ 6 7 #ifdef HAVE_CONFIG_H 8 #include <config.h> 9 #endif 10 11 #include "tss2_tpm2_types.h" 12 #include "tss2_mu.h" 13 #include "sysapi_util.h" 14 Tss2_Sys_GetTctiContext(TSS2_SYS_CONTEXT * sysContext,TSS2_TCTI_CONTEXT ** tctiContext)15TSS2_RC Tss2_Sys_GetTctiContext( 16 TSS2_SYS_CONTEXT *sysContext, 17 TSS2_TCTI_CONTEXT **tctiContext) 18 { 19 _TSS2_SYS_CONTEXT_BLOB *ctx = syscontext_cast(sysContext); 20 21 if (!ctx || !tctiContext) 22 return TSS2_SYS_RC_BAD_REFERENCE; 23 24 *tctiContext = ctx->tctiContext; 25 26 return TSS2_RC_SUCCESS; 27 } 28