~ubuntu-branches/ubuntu/hardy/trousers/hardy-proposed

« back to all changes in this revision

Viewing changes to src/include/obj_tpm.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. 2004-2007
 
8
 *
 
9
 */
 
10
 
 
11
#ifndef _OBJ_TPM_H_
 
12
#define _OBJ_TPM_H_
 
13
 
 
14
/* structures */
 
15
struct tr_tpm_obj {
 
16
        TSS_HPOLICY policy;
 
17
#ifdef TSS_BUILD_TSS12
 
18
        TSS_HPOLICY operatorPolicy;
 
19
#endif
 
20
        TSS_ALGORITHM_ID collateAlg;
 
21
        TSS_ALGORITHM_ID activateAlg;
 
22
        PVOID collateAppData;
 
23
        PVOID activateAppData;
 
24
        TSS_RESULT (*Tspicb_CollateIdentity)(
 
25
                        PVOID lpAppData,
 
26
                        UINT32 ulTCPAPlainIdentityProofLength,
 
27
                        BYTE *rgbTCPAPlainIdentityProof,
 
28
                        TSS_ALGORITHM_ID algID,
 
29
                        UINT32* ulSessionKeyLength,
 
30
                        BYTE *rgbSessionKey,
 
31
                        UINT32 *pulTCPAIdentityProofLength,
 
32
                        BYTE *rgbTCPAIdentityProof);
 
33
        TSS_RESULT (*Tspicb_ActivateIdentity)(
 
34
                        PVOID lpAppData,
 
35
                        UINT32 ulSessionKeyLength,
 
36
                        BYTE *rgbSessionKey,
 
37
                        UINT32 ulSymCAAttestationBlobLength,
 
38
                        BYTE *rgbSymCAAttestationBlob,
 
39
                        UINT32 *pulCredentialLength,
 
40
                        BYTE *rgbCredential);
 
41
        TSS_COUNTER_ID ctr_id;
 
42
        UINT32 EndorsementCredSize;
 
43
        BYTE *EndorsementCred;
 
44
        UINT32 PlatformCredSize;
 
45
        BYTE *PlatformCred;
 
46
        UINT32 PlatformConfCredSize;
 
47
        BYTE *PlatformConfCred;
 
48
        UINT32 ConformanceCredSize;
 
49
        BYTE *ConformanceCred;
 
50
};
 
51
 
 
52
/* prototypes */
 
53
TSS_RESULT         obj_getTpmObject(UINT32, TSS_HOBJECT *);
 
54
 
 
55
/* obj_tpm.c */
 
56
void       tpm_free(void *);
 
57
TSS_BOOL   obj_is_tpm(TSS_HOBJECT);
 
58
TSS_RESULT obj_tpm_get_tsp_context(TSS_HTPM, TSS_HCONTEXT *);
 
59
TSS_RESULT obj_tpm_get(TSS_HCONTEXT, TSS_HTPM *);
 
60
TSS_RESULT obj_tpm_set_policy(TSS_HTPM, TSS_HPOLICY);
 
61
TSS_RESULT obj_tpm_add(TSS_HCONTEXT, TSS_HOBJECT *);
 
62
TSS_RESULT obj_tpm_get_policy(TSS_HTPM, UINT32, TSS_HPOLICY *);
 
63
TSS_RESULT obj_tpm_set_cb12(TSS_HTPM, TSS_FLAG, BYTE *);
 
64
TSS_RESULT obj_tpm_get_cb12(TSS_HTPM, TSS_FLAG, UINT32 *, BYTE **);
 
65
TSS_RESULT obj_tpm_set_cb11(TSS_HTPM, TSS_FLAG, TSS_FLAG, UINT32);
 
66
TSS_RESULT obj_tpm_get_cb11(TSS_HTPM, TSS_FLAG, UINT32 *);
 
67
void       obj_tpm_remove_policy_refs(TSS_HPOLICY, TSS_HCONTEXT);
 
68
TSS_RESULT obj_tpm_get_current_counter(TSS_HTPM, TSS_COUNTER_ID *);
 
69
TSS_RESULT obj_tpm_set_cred(TSS_HTPM, TSS_FLAG, UINT32, BYTE *);
 
70
TSS_RESULT obj_tpm_get_cred(TSS_HTPM, TSS_FLAG, UINT32 *, BYTE **);
 
71
 
 
72
#define TPM_LIST_DECLARE                struct obj_list tpm_list
 
73
#define TPM_LIST_DECLARE_EXTERN         extern struct obj_list tpm_list
 
74
#define TPM_LIST_INIT()                 list_init(&tpm_list)
 
75
#define TPM_LIST_CONNECT(a,b)           obj_connectContext_list(&tpm_list, a, b)
 
76
#define TPM_LIST_CLOSE(a)               obj_list_close(&tpm_list, &tpm_free, a)
 
77
 
 
78
#endif