-
Notifications
You must be signed in to change notification settings - Fork 161
/
Copy pathPolicySignedResponse.java
92 lines (75 loc) · 2.79 KB
/
PolicySignedResponse.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package tss.tpm;
import tss.*;
// -----------This is an auto-generated file: do not edit
//>>>
/** This command includes a signed authorization in a policy. The command ties the policy
* to a signing key by including the Name of the signing key in the policyDigest
*/
public class PolicySignedResponse extends RespStructure
{
/** Implementation-specific time value, used to indicate to the TPM when the ticket expires
* NOTE If policyTicket is a NULL Ticket, then this shall be the Empty Buffer.
*/
public byte[] timeout;
/** Produced if the command succeeds and expiration in the command was non-zero; this
* ticket will use the TPMT_ST_AUTH_SIGNED structure tag. See 23.2.5
*/
public TPMT_TK_AUTH policyTicket;
public PolicySignedResponse() {}
/** TpmMarshaller method */
@Override
public void toTpm(TpmBuffer buf)
{
buf.writeSizedByteBuf(timeout);
policyTicket.toTpm(buf);
}
/** TpmMarshaller method */
@Override
public void initFromTpm(TpmBuffer buf)
{
timeout = buf.readSizedByteBuf();
policyTicket = TPMT_TK_AUTH.fromTpm(buf);
}
/** @deprecated Use {@link #toBytes()} instead
* @return Wire (marshaled) representation of this object
*/
public byte[] toTpm () { return toBytes(); }
/** Static marshaling helper
* @param byteBuf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static PolicySignedResponse fromBytes (byte[] byteBuf)
{
return new TpmBuffer(byteBuf).createObj(PolicySignedResponse.class);
}
/** @deprecated Use {@link #fromBytes(byte[])} instead
* @param byteBuf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static PolicySignedResponse fromTpm (byte[] byteBuf) { return fromBytes(byteBuf); }
/** Static marshaling helper
* @param buf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static PolicySignedResponse fromTpm (TpmBuffer buf)
{
return buf.createObj(PolicySignedResponse.class);
}
@Override
public String toString()
{
TpmStructurePrinter _p = new TpmStructurePrinter("PolicySignedResponse");
toStringInternal(_p, 1);
_p.endStruct();
return _p.toString();
}
@Override
public void toStringInternal(TpmStructurePrinter _p, int d)
{
_p.add(d, "byte[]", "timeout", timeout);
_p.add(d, "TPMT_TK_AUTH", "policyTicket", policyTicket);
}
@Override
public SessEncInfo sessEncInfo() { return new SessEncInfo(2, 1); }
}
//<<<