當前位置: 首頁>>代碼示例>>C++>>正文


C++ CommonPrepareEpilogue函數代碼示例

本文整理匯總了C++中CommonPrepareEpilogue函數的典型用法代碼示例。如果您正苦於以下問題:C++ CommonPrepareEpilogue函數的具體用法?C++ CommonPrepareEpilogue怎麽用?C++ CommonPrepareEpilogue使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CommonPrepareEpilogue函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: Tss2_Sys_GetRandom_Prepare

TPM_RC Tss2_Sys_GetRandom_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    UINT16	bytesRequested
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }



    CommonPreparePrologue( sysContext, TPM_CC_GetRandom );



    Marshal_UINT16( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), bytesRequested, &(SYS_CONTEXT->rval) );

    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 1;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:01org,項目名稱:TPM2.0-TSS,代碼行數:26,代碼來源:Tss2_Sys_GetRandom.c

示例2: Tss2_Sys_IncrementalSelfTest_Prepare

TPM_RC Tss2_Sys_IncrementalSelfTest_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPML_ALG	*toTest
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

    if( toTest == NULL  )
	{
		return TSS2_SYS_RC_BAD_REFERENCE;
	} 

    CommonPreparePrologue( sysContext, TPM_CC_IncrementalSelfTest );

    
            
    Marshal_TPML_ALG( sysContext, toTest );

    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:alex1818,項目名稱:TPM2.0-TSS,代碼行數:29,代碼來源:Tss2_Sys_IncrementalSelfTest.c

示例3: Tss2_Sys_EventSequenceComplete_Prepare

TPM_RC Tss2_Sys_EventSequenceComplete_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_DH_PCR	pcrHandle,
    TPMI_DH_OBJECT	sequenceHandle,
    TPM2B_MAX_BUFFER	*buffer
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

     

    CommonPreparePrologue( sysContext, TPM_CC_EventSequenceComplete );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), pcrHandle, &(SYS_CONTEXT->rval) );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), sequenceHandle, &(SYS_CONTEXT->rval) );

    
            
    MARSHAL_SIMPLE_TPM2B( sysContext, &( buffer->b ) );

    SYS_CONTEXT->decryptAllowed = 1;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:zweib730,項目名稱:TPM2.0-TSS,代碼行數:32,代碼來源:Tss2_Sys_EventSequenceComplete.c

示例4: Tss2_Sys_PCR_Event_Prepare

TPM_RC Tss2_Sys_PCR_Event_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_DH_PCR	pcrHandle,
    TPM2B_EVENT	*eventData
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

    CommonPreparePrologue( sysContext, TPM_CC_PCR_Event );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), pcrHandle, &(SYS_CONTEXT->rval) );

    
            
    MARSHAL_SIMPLE_TPM2B( sysContext, &( eventData->b ) );

    SYS_CONTEXT->decryptAllowed = 1;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:dandantx,項目名稱:TPM2.0-TSS,代碼行數:27,代碼來源:Tss2_Sys_PCR_Event.c

示例5: Tss2_Sys_HierarchyChangeAuth_Prepare

TPM_RC Tss2_Sys_HierarchyChangeAuth_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_RH_HIERARCHY_AUTH	authHandle,
    TPM2B_AUTH	*newAuth
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

    CommonPreparePrologue( sysContext, TPM_CC_HierarchyChangeAuth );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), authHandle, &(SYS_CONTEXT->rval) );

    
            
    MARSHAL_SIMPLE_TPM2B( sysContext, &( newAuth->b ) );

    SYS_CONTEXT->decryptAllowed = 1;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:dandantx,項目名稱:TPM2.0-TSS,代碼行數:27,代碼來源:Tss2_Sys_HierarchyChangeAuth.c

示例6: Tss2_Sys_SetCommandCodeAuditStatus_Prepare

TPM_RC Tss2_Sys_SetCommandCodeAuditStatus_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_RH_PROVISION	auth,
    TPMI_ALG_HASH	auditAlg,
    TPML_CC	*setList,
    TPML_CC	*clearList
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

    CommonPreparePrologue( sysContext, TPM_CC_SetCommandCodeAuditStatus );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), auth, &(SYS_CONTEXT->rval) );

    
            
    Marshal_UINT16( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), auditAlg, &(SYS_CONTEXT->rval) );

    Marshal_TPML_CC( sysContext, setList );

    Marshal_TPML_CC( sysContext, clearList );

    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:dandantx,項目名稱:TPM2.0-TSS,代碼行數:33,代碼來源:Tss2_Sys_SetCommandCodeAuditStatus.c

示例7: Tss2_Sys_PolicyPassword_Prepare

TPM_RC Tss2_Sys_PolicyPassword_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_SH_POLICY	policySession
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

     

    CommonPreparePrologue( sysContext, TPM_CC_PolicyPassword );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), policySession, &(SYS_CONTEXT->rval) );

    
            
    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:zweib730,項目名稱:TPM2.0-TSS,代碼行數:26,代碼來源:Tss2_Sys_PolicyPassword.c

示例8: Tss2_Sys_Startup_Prepare

TPM_RC Tss2_Sys_Startup_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPM_SU	startupType
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }



    CommonPreparePrologue( sysContext, TPM_CC_Startup );



    Marshal_UINT16( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), startupType, &(SYS_CONTEXT->rval) );

    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 0;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:01org,項目名稱:TPM2.0-TSS,代碼行數:26,代碼來源:Tss2_Sys_Startup.c

示例9: Tss2_Sys_HashSequenceStart_Prepare

TPM_RC Tss2_Sys_HashSequenceStart_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPM2B_AUTH	*auth,
    TPMI_ALG_HASH	hashAlg
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

    CommonPreparePrologue( sysContext, TPM_CC_HashSequenceStart );

    if( auth == 0 )
	{
		SYS_CONTEXT->decryptNull = 1;
	}
            
    MARSHAL_SIMPLE_TPM2B( sysContext, &( auth->b ) );

    Marshal_UINT16( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), hashAlg, &(SYS_CONTEXT->rval) );

    SYS_CONTEXT->decryptAllowed = 1;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:dandantx,項目名稱:TPM2.0-TSS,代碼行數:30,代碼來源:Tss2_Sys_HashSequenceStart.c

示例10: Tss2_Sys_ECDH_KeyGen_Prepare

TPM_RC Tss2_Sys_ECDH_KeyGen_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_DH_OBJECT	keyHandle
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

     

    CommonPreparePrologue( sysContext, TPM_CC_ECDH_KeyGen );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), keyHandle, &(SYS_CONTEXT->rval) );

    
            
    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 1;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:zweib730,項目名稱:TPM2.0-TSS,代碼行數:26,代碼來源:Tss2_Sys_ECDH_KeyGen.c

示例11: Tss2_Sys_ContextLoad_Prepare

TPM_RC Tss2_Sys_ContextLoad_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMS_CONTEXT	*context
)
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

    if( context == NULL  )
    {
        return TSS2_SYS_RC_BAD_REFERENCE;
    }

    CommonPreparePrologue( sysContext, TPM_CC_ContextLoad );



    Marshal_TPMS_CONTEXT( sysContext, context );

    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 0;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:01org,項目名稱:TPM2.0-TSS,代碼行數:29,代碼來源:Tss2_Sys_ContextLoad.c

示例12: Tss2_Sys_PP_Commands_Prepare

TPM_RC Tss2_Sys_PP_Commands_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_RH_PLATFORM	auth,
    TPML_CC	*setList,
    TPML_CC	*clearList
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

    if( setList == NULL  || clearList == NULL  )
	{
		return TSS2_SYS_RC_BAD_REFERENCE;
	} 

    CommonPreparePrologue( sysContext, TPM_CC_PP_Commands );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), auth, &(SYS_CONTEXT->rval) );

    
            
    Marshal_TPML_CC( sysContext, setList );

    Marshal_TPML_CC( sysContext, clearList );

    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:zweib730,項目名稱:TPM2.0-TSS,代碼行數:35,代碼來源:Tss2_Sys_PP_Commands.c

示例13: Tss2_Sys_GetCapability_Prepare

TPM_RC Tss2_Sys_GetCapability_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPM_CAP	capability,
    UINT32	property,
    UINT32	propertyCount
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }



    CommonPreparePrologue( sysContext, TPM_CC_GetCapability );



    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), capability, &(SYS_CONTEXT->rval) );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), property, &(SYS_CONTEXT->rval) );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), propertyCount, &(SYS_CONTEXT->rval) );

    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 0;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:01org,項目名稱:TPM2.0-TSS,代碼行數:32,代碼來源:Tss2_Sys_GetCapability.c

示例14: Tss2_Sys_HMAC_Prepare

TPM_RC Tss2_Sys_HMAC_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_DH_OBJECT	handle,
    TPM2B_MAX_BUFFER	*buffer,
    TPMI_ALG_HASH	hashAlg
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

     

    CommonPreparePrologue( sysContext, TPM_CC_HMAC );

    Marshal_UINT32( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), handle, &(SYS_CONTEXT->rval) );

    if( buffer == 0 )
	{
		SYS_CONTEXT->decryptNull = 1;
	}
            
    MARSHAL_SIMPLE_TPM2B( sysContext, &( buffer->b ) );

    Marshal_UINT16( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), hashAlg, &(SYS_CONTEXT->rval) );

    SYS_CONTEXT->decryptAllowed = 1;
    SYS_CONTEXT->encryptAllowed = 1;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:zweib730,項目名稱:TPM2.0-TSS,代碼行數:35,代碼來源:Tss2_Sys_HMAC.c

示例15: Tss2_Sys_EC_Ephemeral_Prepare

TPM_RC Tss2_Sys_EC_Ephemeral_Prepare(
    TSS2_SYS_CONTEXT *sysContext,
    TPMI_ECC_CURVE	curveID
    )
{
    if( sysContext == NULL )
    {
        return( TSS2_SYS_RC_BAD_REFERENCE );
    }

     

    CommonPreparePrologue( sysContext, TPM_CC_EC_Ephemeral );

    
            
    Marshal_UINT16( SYS_CONTEXT->tpmInBuffPtr, SYS_CONTEXT->maxCommandSize, &(SYS_CONTEXT->nextData), curveID, &(SYS_CONTEXT->rval) );

    SYS_CONTEXT->decryptAllowed = 0;
    SYS_CONTEXT->encryptAllowed = 1;
    SYS_CONTEXT->authAllowed = 1;

    CommonPrepareEpilogue( sysContext );

    return SYS_CONTEXT->rval;
}
開發者ID:zweib730,項目名稱:TPM2.0-TSS,代碼行數:26,代碼來源:Tss2_Sys_EC_Ephemeral.c


注:本文中的CommonPrepareEpilogue函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。