@@ -10,15 +10,15 @@ use crate::{
1010 attributes:: { ObjectAttributesBuilder , SessionAttributesBuilder } ,
1111 constants:: { SessionType , TpmFormatZeroError } ,
1212 error:: { TpmFormatZeroResponseCode , TpmResponseCode } ,
13- handles:: { KeyHandle , SessionHandle } ,
13+ handles:: { KeyHandle , ObjectHandle , SessionHandle } ,
1414 interface_types:: {
1515 algorithm:: { HashingAlgorithm , PublicAlgorithm } ,
1616 ecc:: EccCurve ,
1717 key_bits:: RsaKeyBits ,
1818 reserved_handles:: Hierarchy ,
1919 } ,
2020 structures:: {
21- Auth , CreateKeyResult , Data , Digest , EccPoint , EccScheme , Public , PublicBuilder ,
21+ Auth , CreateKeyResult , Data , Digest , EccPoint , EccScheme , Name , Public , PublicBuilder ,
2222 PublicEccParametersBuilder , PublicKeyRsa , PublicRsaParametersBuilder , RsaExponent ,
2323 RsaScheme , Signature , SignatureScheme , SymmetricDefinitionObject , VerifiedTicket ,
2424 } ,
@@ -386,6 +386,12 @@ impl TransientKeyContext {
386386 Ok ( key_material)
387387 }
388388
389+ /// Gets the name of the root key of the TransientKeyContext
390+ pub fn get_root_key_name ( & mut self ) -> Result < Name > {
391+ let obj_handle: ObjectHandle = self . root_key_handle . into ( ) ;
392+ self . context . tr_get_name ( obj_handle)
393+ }
394+
389395 /// Sets the encrypt and decrypt flags on the main session used by the context.
390396 ///
391397 /// # Errors
0 commit comments