Package tss.tpm

Class 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 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 byte[] toTpm()
        Deprecated.
        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.
        Use fromBytes(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 class TpmStructure
        Parameters:
        _p - The structure accumulator
        d - The data to serialize
      • numHandles

        public int numHandles()
        Overrides:
        numHandles in class CmdStructure
        Returns:
        Number of TPM handles contained (as fields) in this data structure
      • numAuthHandles

        public int numAuthHandles()
        Overrides:
        numAuthHandles in class ReqStructure
        Returns:
        Number of authorization TPM handles contained in this data structure
      • getHandles

        public TPM_HANDLE[] getHandles()
        Overrides:
        getHandles in class ReqStructure
        Returns:
        An array of TPM handles contained in this TPM request data structure
      • sessEncInfo

        public SessEncInfo sessEncInfo()
        Overrides:
        sessEncInfo in class CmdStructure
        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.