3
* Licensed Materials - Property of IBM
5
* trousers - An open source TCG Software Stack
7
* (C) Copyright International Business Machines Corp. 2007
18
/* XOR masks created before each use of an OSAP session */
19
TPM_ENCAUTH encAuthUse;
20
TPM_ENCAUTH encAuthMig;
22
TSS_HCONTEXT tspContext;
23
TPM_COMMAND_CODE command;
25
TSS_HOBJECT obj_parent;
26
TSS_HPOLICY hUsageParent;
28
TPM_SECRET parentSecret;
29
TSS_CALLBACK cb_xor, cb_hmac, cb_sealx;
31
TPM_ENTITY_TYPE entity_type;
32
UINT32 entityValueSize;
35
TSS_HOBJECT obj_child;
36
TSS_HPOLICY hUsageChild, hMigChild;
39
/* Created during OSAP or DSAP protocol initiation */
40
TPM_NONCE nonceOddxSAP;
41
TPM_NONCE nonceEvenxSAP;
42
TPM_HMAC sharedSecret;
44
//MUTEX_DECLARE(lock);
45
//struct authsess *next;
48
TSS_RESULT authsess_oiap_get(TSS_HOBJECT, TPM_COMMAND_CODE, TPM_DIGEST *, TPM_AUTH *);
49
TSS_RESULT authsess_oiap_put(TPM_AUTH *, TPM_DIGEST *);
51
TSS_RESULT authsess_xsap_init(TSS_HCONTEXT, TSS_HOBJECT, TSS_HOBJECT, TSS_BOOL, TPM_COMMAND_CODE, TPM_ENTITY_TYPE, struct authsess **);
52
TSS_RESULT authsess_xsap_hmac(struct authsess *, TPM_DIGEST *);
53
TSS_RESULT authsess_xsap_verify(struct authsess *, TPM_DIGEST *);
54
void authsess_free(struct authsess *);
56
#define TSS_AUTH_POLICY_REQUIRED TRUE
57
#define TSS_AUTH_POLICY_NOT_REQUIRED FALSE