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

« back to all changes in this revision

Viewing changes to src/include/tcsps.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:
11
11
#ifndef _TCSPS_H_
12
12
#define _TCSPS_H_
13
13
 
14
 
#include <pthread.h>
 
14
#include "threads.h"
15
15
 
16
16
extern struct key_disk_cache *key_disk_cache_head;
17
17
/* file handles for the persistent stores */
18
18
extern int system_ps_fd;
19
19
/* The lock that surrounds all manipulations of the disk cache */
20
 
extern pthread_mutex_t disk_cache_lock;
 
20
MUTEX_DECLARE_EXTERN(disk_cache_lock);
21
21
 
22
22
int                get_file();
23
23
int                put_file(int);
27
27
inline TSS_RESULT  write_data(int, void *, UINT32);
28
28
int                write_key_init(int, UINT32, UINT32, UINT32);
29
29
TSS_RESULT         cache_key(UINT32, UINT16, TSS_UUID *, TSS_UUID *, UINT16, UINT32, UINT32);
30
 
TSS_RESULT         UnloadBlob_KEY_PS(UINT16 *, BYTE *, TCPA_KEY *);
 
30
TSS_RESULT         UnloadBlob_KEY_PS(UINT16 *, BYTE *, TSS_KEY *);
31
31
TSS_RESULT         psfile_get_parent_uuid_by_uuid(int, TSS_UUID *, TSS_UUID *);
32
32
TSS_RESULT         psfile_remove_key_by_uuid(int, TSS_UUID *);
33
33
TSS_RESULT         psfile_get_key_by_uuid(int, TSS_UUID *, BYTE *, UINT16 *);
34
34
TSS_RESULT         psfile_get_key_by_cache_entry(int, struct key_disk_cache *, BYTE *, UINT16 *);
35
35
TSS_RESULT         psfile_get_ps_type_by_uuid(int, TSS_UUID *, UINT32 *);
 
36
TSS_RESULT         psfile_get_vendor_data(int, struct key_disk_cache *, UINT32 *, BYTE **);
36
37
TSS_RESULT         psfile_is_pub_registered(int, TCPA_STORE_PUBKEY *, TSS_BOOL *);
37
38
TSS_RESULT         psfile_get_uuid_by_pub(int, TCPA_STORE_PUBKEY *, TSS_UUID **);
38
39
TSS_RESULT         psfile_write_key(int, TSS_UUID *, TSS_UUID *, UINT32 *, BYTE *, UINT32, BYTE *, UINT16);
51
52
TSS_RESULT         ps_write_key(TSS_UUID *, TSS_UUID *, BYTE *, UINT32, BYTE *, UINT32);
52
53
TSS_RESULT         ps_get_key_by_uuid(TSS_UUID *, BYTE *, UINT16 *);
53
54
TSS_RESULT         ps_get_key_by_cache_entry(struct key_disk_cache *, BYTE *, UINT16 *);
 
55
TSS_RESULT         ps_get_vendor_data(struct key_disk_cache *, UINT32 *, BYTE **);
54
56
TSS_RESULT         ps_init_disk_cache();
55
57
void               ps_close_disk_cache();
56
58
TSS_RESULT         ps_get_key_by_pub(TCPA_STORE_PUBKEY *, UINT32 *, BYTE **);
57
59
 
 
60
#ifdef TSS_BUILD_PS
 
61
#define PS_init_disk_cache()    ps_init_disk_cache()
 
62
#define PS_close_disk_cache()   ps_close_disk_cache()
 
63
#else
 
64
#define PS_init_disk_cache()    (TSS_SUCCESS)
 
65
#define PS_close_disk_cache()
 
66
#endif
 
67
 
58
68
#endif