1Tspi_Policy_SetSecreTtC(G3)Software Stack Developer's ReferTesnpcie_Policy_SetSecret(3)
2
3
4
6 Tspi_Policy_SetSecret - set the authorization data of a policy object
7 and define the handling of its retrieval
8
10 #include <tss/platform.h>
11 #include <tss/tcpa_defines.h>
12 #include <tss/tcpa_typedef.h>
13 #include <tss/tcpa_struct.h>
14 #include <tss/tss_typedef.h>
15 #include <tss/tss_structs.h>
16 #include <tss/tspi.h>
17
18 TSS_RESULT Tspi_Policy_SetSecret(TSS_HPOLICY hPolicy, TSS_FLAG secretMode,
19 UINT32 ulSecretLength, BYTE* rgbSecret);
20
21
22
24 TSS_Policy_SetSecret sets the authorization data for an object. This
25 mthod also defines the handling of its retrieving. There are mand dif‐
26 ferent paths as specified by the secretMode Flag.
27
29 hPolicy
30 The handle of the policy object.
31
32 secretMode
33 Flag indicating the policy secret mode to set. Possible values are:
34 TSS_SECRET_MODE_SHA1 - Secret in the form of 20 bytes of SHA-1 data.
35 The secret will not be touched by the TSP.
36 TSS_SECRET_MODE_PLAIN - The data passed in will be hashed by the TSP
37 using SHA-1.
38 TSS_SECRET_MODE_POPUP - The TSP will ask for a secret by displaying a
39 GUI pop-up window.
40 TSS_SECRET_MODE_CALLBACK - The application will provide a callback
41 function for authorization data.
42 TSS_SECRET_MODE_NONE - ulSecretLen and rgbSecret are ignored and any
43 object requiring auth assigned this policy will return an error.
44
45 ulSecretLength
46 The length (in bytes) of the rgbSecret parameter.
47
48 rgbSecret
49 The secret data blob.
50
52 Tspi_Policy_SetSecret returns TSS_SUCCESS on success, otherwise one of
53 the following values are returned:
54
55 TSS_E_INVALID_HANDLE - hPolicy is an invalid parameter.
56
57 TSS_E_INTERNAL_ERROR - An error occurred internal to the TSS.
58
60 Tspi_Policy_SetSecret conforms to the Trusted Computing Group Software
61 Specification version 1.1 Golden
62
64 Tspi_Policy_FlushSecret(3).
65
66
67
68TSS 1.1 2004-05-26 Tspi_Policy_SetSecret(3)