aboutsummaryrefslogtreecommitdiff
path: root/HashSequenceStart.c
blob: 3f6bafccc42e0b1c3f0de8a30a3020ecd34af91f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// This file was extracted from the TCG Published
// Trusted Platform Module Library
// Part 3: Commands
// Family "2.0"
// Level 00 Revision 01.16
// October 30, 2014

#include "InternalRoutines.h"
#include "HashSequenceStart_fp.h"
//
//
//     Error Returns                     Meaning
//
//     TPM_RC_OBJECT_MEMORY              no space to create an internal object
//
TPM_RC
TPM2_HashSequenceStart(
   HashSequenceStart_In      *in,                   // IN: input parameter list
   HashSequenceStart_Out     *out                   // OUT: output parameter list
   )
{
// Internal Data Update

   if(in->hashAlg == TPM_ALG_NULL)
       // Start a event sequence. A TPM_RC_OBJECT_MEMORY error may be
       // returned at this point
       return ObjectCreateEventSequence(&in->auth, &out->sequenceHandle);

   // Start a hash sequence. A TPM_RC_OBJECT_MEMORY error may be
   // returned at this point
   return ObjectCreateHashSequence(in->hashAlg, &in->auth, &out->sequenceHandle);
}