@@ -10,15 +10,15 @@ use crate::{
10
10
attributes:: { ObjectAttributesBuilder , SessionAttributesBuilder } ,
11
11
constants:: { SessionType , TpmFormatZeroError } ,
12
12
error:: { TpmFormatZeroResponseCode , TpmResponseCode } ,
13
- handles:: { KeyHandle , SessionHandle } ,
13
+ handles:: { KeyHandle , ObjectHandle , SessionHandle } ,
14
14
interface_types:: {
15
15
algorithm:: { HashingAlgorithm , PublicAlgorithm } ,
16
16
ecc:: EccCurve ,
17
17
key_bits:: RsaKeyBits ,
18
18
reserved_handles:: Hierarchy ,
19
19
} ,
20
20
structures:: {
21
- Auth , CreateKeyResult , Data , Digest , EccPoint , EccScheme , Public , PublicBuilder ,
21
+ Auth , CreateKeyResult , Data , Digest , EccPoint , EccScheme , Name , Public , PublicBuilder ,
22
22
PublicEccParametersBuilder , PublicKeyRsa , PublicRsaParametersBuilder , RsaExponent ,
23
23
RsaScheme , Signature , SignatureScheme , SymmetricDefinitionObject , VerifiedTicket ,
24
24
} ,
@@ -386,6 +386,12 @@ impl TransientKeyContext {
386
386
Ok ( key_material)
387
387
}
388
388
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
+
389
395
/// Sets the encrypt and decrypt flags on the main session used by the context.
390
396
///
391
397
/// # Errors
0 commit comments