ia64/xen-unstable

view tools/vtpm_manager/manager/vtsp.h @ 8977:f84d5cdd9895

Clean up segment selector fixup and validation.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Feb 23 14:43:45 2006 +0100 (2006-02-23)
parents d186157615d6
children 8589cdd09636
line source
1 // ===================================================================
2 //
3 // Copyright (c) 2005, Intel Corp.
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions
8 // are met:
9 //
10 // * Redistributions of source code must retain the above copyright
11 // notice, this list of conditions and the following disclaimer.
12 // * Redistributions in binary form must reproduce the above
13 // copyright notice, this list of conditions and the following
14 // disclaimer in the documentation and/or other materials provided
15 // with the distribution.
16 // * Neither the name of Intel Corporation nor the names of its
17 // contributors may be used to endorse or promote products derived
18 // from this software without specific prior written permission.
19 //
20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31 // OF THE POSSIBILITY OF SUCH DAMAGE.
32 // ===================================================================
33 //
34 // vtsp.h
35 //
36 // Higher level interface to TCS.
37 //
38 // ==================================================================
40 #ifndef __VTSP_H__
41 #define __VTSP_H__
43 #include "tcg.h"
44 #include "tcs.h"
46 #define KEY_BUFFER_SIZE 2048
48 TPM_RESULT VTSP_RawTransmit(const TCS_CONTEXT_HANDLE hContext,
49 const buffer_t *inbuf,
50 buffer_t *outbuf );
52 TPM_RESULT VTSP_OIAP( const TCS_CONTEXT_HANDLE hContext,
53 TCS_AUTH *auth);
55 TPM_RESULT VTSP_OSAP( const TCS_CONTEXT_HANDLE hContext,
56 const TPM_ENTITY_TYPE entityType,
57 const UINT32 entityValue,
58 const TPM_AUTHDATA *usageAuth,
59 TPM_SECRET *sharedsecret,
60 TCS_AUTH *auth);
62 TPM_RESULT VTSP_ReadPubek( const TCS_CONTEXT_HANDLE hContext,
63 CRYPTO_INFO *cypto_info);
65 TPM_RESULT VTSP_TakeOwnership( const TCS_CONTEXT_HANDLE hContext,
66 const TPM_AUTHDATA *ownerAuth,
67 const TPM_AUTHDATA *srkAuth,
68 CRYPTO_INFO *ek_cryptoInfo,
69 TCS_AUTH *auth);
71 TPM_RESULT VTSP_DisablePubekRead( const TCS_CONTEXT_HANDLE hContext,
72 const TPM_AUTHDATA *ownerAuth,
73 TCS_AUTH *auth);
75 TPM_RESULT VTSP_CreateWrapKey( const TCS_CONTEXT_HANDLE hContext,
76 const TPM_KEY_USAGE usage,
77 const TPM_AUTHDATA *newKeyAuth,
78 const TCS_KEY_HANDLE parentHandle,
79 const TPM_AUTHDATA *osapSharedSecret,
80 buffer_t *pubKeyBuf,
81 TCS_AUTH *auth);
83 TPM_RESULT VTSP_LoadKey(const TCS_CONTEXT_HANDLE hContext,
84 const TCS_KEY_HANDLE hUnwrappingKey,
85 const buffer_t *rgbWrappedKeyBlob,
86 const TPM_AUTHDATA *parentAuth,
87 TPM_HANDLE *newKeyHandle,
88 TCS_AUTH *pAuth,
89 CRYPTO_INFO *cryptoinfo,
90 const BOOL skipTPMLoad);
92 TPM_RESULT VTSP_Unbind( const TCS_CONTEXT_HANDLE hContext,
93 const TPM_KEY_HANDLE key_handle,
94 const buffer_t *bound_data,
95 const TPM_AUTHDATA *usage_auth,
96 buffer_t *clear_data,
97 TCS_AUTH *auth);
99 TPM_RESULT VTSP_Bind( CRYPTO_INFO *cryptoInfo,
100 const buffer_t *inData,
101 buffer_t *outData);
103 TPM_RESULT VTSP_Seal(const TCS_CONTEXT_HANDLE hContext,
104 const TPM_KEY_HANDLE keyHandle,
105 const TPM_AUTHDATA *sealDataAuth,
106 const TPM_PCR_COMPOSITE *pcrComp,
107 const buffer_t *inData,
108 TPM_STORED_DATA *sealedData,
109 const TPM_SECRET *osapSharedSecret,
110 TCS_AUTH *auth);
112 TPM_RESULT VTSP_Unseal(const TCS_CONTEXT_HANDLE hContext,
113 const TPM_KEY_HANDLE keyHandle,
114 const TPM_STORED_DATA *sealedData,
115 const TPM_AUTHDATA *key_usage_auth,
116 const TPM_AUTHDATA *data_usage_auth,
117 buffer_t *outData,
118 TCS_AUTH *auth,
119 TCS_AUTH *dataAuth);
121 #endif //_VTSP_H_