Relative Content

Tag Archive for javatpmtss

Why use tpm in TSS. java project The EvictControl() method runs incorrectly with the message: {NO_SESSIONS} ?

public static void main(String[] args) throws IOException { Tpm tpm = TpmFactory.platformTpm(); byte[] nullVec = new byte[0]; byte[] aesKey = Helpers.RandomBytes(16); TPMT_PUBLIC aesTemplate = new TPMT_PUBLIC(TPM_ALG_ID.SHA256, new TPMA_OBJECT(new TPMA_OBJECT[]{TPMA_OBJECT.decrypt, TPMA_OBJECT.sign, TPMA_OBJECT.fixedParent, TPMA_OBJECT.fixedTPM, TPMA_OBJECT.userWithAuth}), new byte[0], new TPMS_SYMCIPHER_PARMS(new TPMT_SYM_DEF_OBJECT(TPM_ALG_ID.AES, 128, TPM_ALG_ID.CFB)), new TPM2B_DIGEST_SYMCIPHER()); TPMS_SENSITIVE_CREATE sensCreate = new TPMS_SENSITIVE_CREATE(nullVec, aesKey); CreatePrimaryResponse aesPrimary = tpm.CreatePrimary(tpm._OwnerHandle, sensCreate, aesTemplate, nullVec, […]