Package tss.tpm
Class TPM2_PolicySigned_REQUEST
- java.lang.Object
-
- tss.TpmStructure
-
- tss.CmdStructure
-
- tss.ReqStructure
-
- tss.tpm.TPM2_PolicySigned_REQUEST
-
- All Implemented Interfaces:
TpmMarshaller
public class TPM2_PolicySigned_REQUEST extends ReqStructure
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
-
-
Field Summary
Fields Modifier and Type Field Description TPMU_SIGNATURE
auth
Signed authorization (not optional) One of: TPMS_SIGNATURE_RSASSA, TPMS_SIGNATURE_RSAPSS, TPMS_SIGNATURE_ECDSA, TPMS_SIGNATURE_ECDAA, TPMS_SIGNATURE_SM2, TPMS_SIGNATURE_ECSCHNORR, TPMT_HA, TPMS_SCHEME_HASH, TPMS_NULL_SIGNATURE.TPM_HANDLE
authObject
Handle for a key that will validate the signature Auth Index: Nonebyte[]
cpHashA
Digest of the command parameters to which this authorization is limited This is not the cpHash for this command but the cpHash for the command to which this policy session will be applied.int
expiration
Time when authorization will expire, measured in seconds from the time that nonceTPM was generated If expiration is non-negative, a NULL Ticket is returned.byte[]
nonceTPM
The policy nonce for the session This can be the Empty Buffer.byte[]
policyRef
A reference to a policy relating to the authorization may be the Empty Buffer Size is limited to be no larger than the nonce size supported on the TPM.TPM_HANDLE
policySession
Handle for the policy session being extended Auth Index: None
-
Constructor Summary
Constructors Constructor Description TPM2_PolicySigned_REQUEST()
TPM2_PolicySigned_REQUEST(TPM_HANDLE _authObject, TPM_HANDLE _policySession, byte[] _nonceTPM, byte[] _cpHashA, byte[] _policyRef, int _expiration, TPMU_SIGNATURE _auth)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TPM_ALG_ID
authSigAlg()
Selector of the algorithm used to construct the signaturestatic TPM2_PolicySigned_REQUEST
fromBytes(byte[] byteBuf)
Static marshaling helperstatic TPM2_PolicySigned_REQUEST
fromTpm(byte[] byteBuf)
Deprecated.UsefromBytes(byte[])
insteadstatic TPM2_PolicySigned_REQUEST
fromTpm(TpmBuffer buf)
Static marshaling helperTPM_HANDLE[]
getHandles()
void
initFromTpm(TpmBuffer buf)
TpmMarshaller methodint
numAuthHandles()
int
numHandles()
SessEncInfo
sessEncInfo()
String
toString()
void
toStringInternal(TpmStructurePrinter _p, int d)
Serialize this object to the structure printerbyte[]
toTpm()
Deprecated.UseTpmStructure.toBytes()
insteadvoid
toTpm(TpmBuffer buf)
TpmMarshaller method-
Methods inherited from class tss.ReqStructure
typeName
-
Methods inherited from class tss.TpmStructure
equals, hashCode, toBytes
-
-
-
-
Field Detail
-
authObject
public TPM_HANDLE authObject
Handle for a key that will validate the signature Auth Index: None
-
policySession
public TPM_HANDLE policySession
Handle for the policy session being extended Auth Index: None
-
nonceTPM
public byte[] nonceTPM
The policy nonce for the session This can be the Empty Buffer.
-
cpHashA
public byte[] cpHashA
Digest of the command parameters to which this authorization is limited This is not the cpHash for this command but the cpHash for the command to which this policy session will be applied. If it is not limited, the parameter will be the Empty Buffer.
-
policyRef
public byte[] policyRef
A reference to a policy relating to the authorization may be the Empty Buffer Size is limited to be no larger than the nonce size supported on the TPM.
-
expiration
public int expiration
Time when authorization will expire, measured in seconds from the time that nonceTPM was generated If expiration is non-negative, a NULL Ticket is returned. See 23.2.5.
-
auth
public TPMU_SIGNATURE auth
Signed authorization (not optional) One of: TPMS_SIGNATURE_RSASSA, TPMS_SIGNATURE_RSAPSS, TPMS_SIGNATURE_ECDSA, TPMS_SIGNATURE_ECDAA, TPMS_SIGNATURE_SM2, TPMS_SIGNATURE_ECSCHNORR, TPMT_HA, TPMS_SCHEME_HASH, TPMS_NULL_SIGNATURE.
-
-
Constructor Detail
-
TPM2_PolicySigned_REQUEST
public TPM2_PolicySigned_REQUEST()
-
TPM2_PolicySigned_REQUEST
public TPM2_PolicySigned_REQUEST(TPM_HANDLE _authObject, TPM_HANDLE _policySession, byte[] _nonceTPM, byte[] _cpHashA, byte[] _policyRef, int _expiration, TPMU_SIGNATURE _auth)
- Parameters:
_authObject
- Handle for a key that will validate the signature Auth Index: None_policySession
- Handle for the policy session being extended Auth Index: None_nonceTPM
- The policy nonce for the session This can be the Empty Buffer._cpHashA
- Digest of the command parameters to which this authorization is limited This is not the cpHash for this command but the cpHash for the command to which this policy session will be applied. If it is not limited, the parameter will be the Empty Buffer._policyRef
- A reference to a policy relating to the authorization may be the Empty Buffer Size is limited to be no larger than the nonce size supported on the TPM._expiration
- Time when authorization will expire, measured in seconds from the time that nonceTPM was generated If expiration is non-negative, a NULL Ticket is returned. See 23.2.5._auth
- Signed authorization (not optional) One of: TPMS_SIGNATURE_RSASSA, TPMS_SIGNATURE_RSAPSS, TPMS_SIGNATURE_ECDSA, TPMS_SIGNATURE_ECDAA, TPMS_SIGNATURE_SM2, TPMS_SIGNATURE_ECSCHNORR, TPMT_HA, TPMS_SCHEME_HASH, TPMS_NULL_SIGNATURE.
-
-
Method Detail
-
authSigAlg
public TPM_ALG_ID authSigAlg()
Selector of the algorithm used to construct the signature
-
toTpm
public void toTpm(TpmBuffer buf)
TpmMarshaller method- Specified by:
toTpm
in interfaceTpmMarshaller
- Overrides:
toTpm
in classTpmStructure
- Parameters:
buf
- An output byte buffer
-
initFromTpm
public void initFromTpm(TpmBuffer buf)
TpmMarshaller method- Specified by:
initFromTpm
in interfaceTpmMarshaller
- Overrides:
initFromTpm
in classTpmStructure
- Parameters:
buf
- An input byte buffer
-
toTpm
public byte[] toTpm()
Deprecated.UseTpmStructure.toBytes()
instead- Returns:
- Wire (marshaled) representation of this object
-
fromBytes
public static TPM2_PolicySigned_REQUEST fromBytes(byte[] byteBuf)
Static marshaling helper- Parameters:
byteBuf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
fromTpm
public static TPM2_PolicySigned_REQUEST fromTpm(byte[] byteBuf)
Deprecated.UsefromBytes(byte[])
instead- Parameters:
byteBuf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
fromTpm
public static TPM2_PolicySigned_REQUEST fromTpm(TpmBuffer buf)
Static marshaling helper- Parameters:
buf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
toStringInternal
public void toStringInternal(TpmStructurePrinter _p, int d)
Description copied from class:TpmStructure
Serialize this object to the structure printer- Overrides:
toStringInternal
in classTpmStructure
- Parameters:
_p
- The structure accumulatord
- The data to serialize
-
numHandles
public int numHandles()
- Overrides:
numHandles
in classCmdStructure
- Returns:
- Number of TPM handles contained (as fields) in this data structure
-
numAuthHandles
public int numAuthHandles()
- Overrides:
numAuthHandles
in classReqStructure
- Returns:
- Number of authorization TPM handles contained in this data structure
-
getHandles
public TPM_HANDLE[] getHandles()
- Overrides:
getHandles
in classReqStructure
- Returns:
- An array of TPM handles contained in this TPM request data structure
-
sessEncInfo
public SessEncInfo sessEncInfo()
- Overrides:
sessEncInfo
in classCmdStructure
- Returns:
- Non-zero size info of the encryptable command/response parameter if session based encryption can be applied to this object (i.e. its first non-handle field is marshaled in size-prefixed form). Otherwise returns zero initialized struct.
-
-