~ubuntu-branches/ubuntu/jaunty/trousers/jaunty

« back to all changes in this revision

Viewing changes to src/include/authsess.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-01-23 22:03:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123220300-fhtqja3c0oq0gp6z
Tags: 0.3.1-4
* Added patch from Aaron M. Ucko <ucko@debian.org> to allow trousers to
  build successfully on amd64, and presumably also other 64-bit
  architectures (Closes: #457400).
* Including udev rule for /dev/tpm from William Lima
  <wlima.amadeus@gmail.com> as suggested by David Smith <dds@google.com>
  (Closes: #459682).
* Added lintian overrides.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * Licensed Materials - Property of IBM
 
4
 *
 
5
 * trousers - An open source TCG Software Stack
 
6
 *
 
7
 * (C) Copyright International Business Machines Corp. 2007
 
8
 *
 
9
 */
 
10
 
 
11
#ifndef _AUTHSESS_H_
 
12
#define _AUTHSESS_H_
 
13
 
 
14
struct authsess {
 
15
        TPM_AUTH *pAuth;
 
16
        TPM_AUTH auth;
 
17
 
 
18
        /* XOR masks created before each use of an OSAP session */
 
19
        TPM_ENCAUTH encAuthUse;
 
20
        TPM_ENCAUTH encAuthMig;
 
21
 
 
22
        TSS_HCONTEXT tspContext;
 
23
        TPM_COMMAND_CODE command;
 
24
 
 
25
        TSS_HOBJECT obj_parent;
 
26
        TSS_HPOLICY hUsageParent;
 
27
        UINT32 parentMode;
 
28
        TPM_SECRET parentSecret;
 
29
        TSS_CALLBACK cb_xor, cb_hmac, cb_sealx;
 
30
 
 
31
        TPM_ENTITY_TYPE entity_type;
 
32
        UINT32 entityValueSize;
 
33
        BYTE *entityValue;
 
34
 
 
35
        TSS_HOBJECT obj_child;
 
36
        TSS_HPOLICY hUsageChild, hMigChild;
 
37
        UINT32 uMode, mMode;
 
38
 
 
39
        /* Created during OSAP or DSAP protocol initiation */
 
40
        TPM_NONCE nonceOddxSAP;
 
41
        TPM_NONCE nonceEvenxSAP;
 
42
        TPM_HMAC sharedSecret;
 
43
 
 
44
        //MUTEX_DECLARE(lock);
 
45
        //struct authsess *next;
 
46
};
 
47
 
 
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 *);
 
50
 
 
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 *);
 
55
 
 
56
#define TSS_AUTH_POLICY_REQUIRED        TRUE
 
57
#define TSS_AUTH_POLICY_NOT_REQUIRED    FALSE
 
58
 
 
59
#endif