Home | History | Annotate | Download | only in tpm2
      1 // This file was extracted from the TCG Published
      2 // Trusted Platform Module Library
      3 // Part 3: Commands
      4 // Family "2.0"
      5 // Level 00 Revision 01.16
      6 // October 30, 2014
      7 
      8 #include "InternalRoutines.h"
      9 #include "PolicyRestart_fp.h"
     10 TPM_RC
     11 TPM2_PolicyRestart(
     12    PolicyRestart_In      *in              // IN: input parameter list
     13    )
     14 {
     15    SESSION                     *session;
     16    BOOL                         wasTrialSession;
     17 
     18 // Internal Data Update
     19 
     20    session = SessionGet(in->sessionHandle);
     21    wasTrialSession = session->attributes.isTrialPolicy == SET;
     22 
     23    // Initialize policy session
     24    SessionResetPolicyData(session);
     25 
     26    session->attributes.isTrialPolicy = wasTrialSession;
     27 
     28    return TPM_RC_SUCCESS;
     29 }
     30