Closed
Description
Since we're currently in an alpha release (yet again) it would be good to know what we'd like to achieve before we can tag a stable release. Our focus right now is to remove all not-abstracted FFI types from the tss-esapi
interface, replacing them with types that we have more control over.
FFI types still present in the Context
interface (not going to link to where they appear, a simple search through the repo should be enough for that):
- TPMT_SIG_SCHEME ( Added SignatureScheme type. #286 )
- TPM2B_ATTEST (
will be lifted from Add TPM2_Certify #221; Adds the attest structures #293 covers this ) - TPMA_LOCALITY ( Removes TPMA_LOCALITY from context methods. #294 )
- TPM2_CC ( Create native type for the TPM2_CC constants. #296 )
- TPM2B_SENSITIVE ( Sensitive buffers #306 )
Another type that currently uses other FFI types in its interface is CapabilityData
. The types:
- TPM2_PT (just replacing the use in
CapabilityData
with the existing abstraction, Adds TaggedTpmProprtyList #301) - TPM2_PT_PCR (Implement native type for TPML_TAGGED_PCR_PROPERTY in CapabilityData. #305, Rust native TPML_TAGGED_PCR_PROPERTY type #308)
- TPMA_ALGORITHM (Updates CapabilityData to use AlgorithmPropertyList #304)
- TPMA_CC(Creates native type for TPML_CCA #315)
- TPML_CCA(Creates native type for TPML_CCA #315)
- TPM2_ECC_CURVE ( Replace type in CapabilityData::EccCurves #312 )
Other bits of work:
- Identify the cause of ActivateCredential error on non-6.1.1 versions (Esys Finish ErrorCode (0x00000101)) #285 and fix it
- Finish off the request in Manually construct PcrData? #277 ( Improved return values of pcr_read. #281 )
- Fix PCR structures issues (PcrSlot wont compile if TPM2_PCR_SELECT_MAX != 4 #310 To few items in PcrSlot compared with what PcrSelectSize can indicate. #311 Fixes some pcr issues. #317 )
I was also wondering about changing a few other things, please list any other ideas/concerns below:
-
Some key-bits types seem redundant, for exampleSm4KeyBits
can only have one value. I wonder if it wouldn't be better to just remove the type completely and have a "default" implementation that produces the correct FFI values wherever they're needed to replace the current conversions - For structures that can be built using
...Builder
structures, we should either document this or create a method on the type to get a new builder, something likepub fn builder() -> ...
( Add builder methods and move NvPublic #316 )