Skip to content

Commit dbd53b2

Browse files
authored
Merge pull request #509 from parallaxsecond/tg/tg/fix-7.x.y-private
tss-esapi/transient: get_root_key_name
2 parents f2a974b + c7e6393 commit dbd53b2

File tree

1 file changed

+8
-2
lines changed
  • tss-esapi/src/abstraction/transient

1 file changed

+8
-2
lines changed

tss-esapi/src/abstraction/transient/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
use crate::{
1010
attributes::{ObjectAttributesBuilder, SessionAttributesBuilder},
1111
constants::{tss::*, SessionType, Tss2ResponseCodeKind},
12-
handles::{KeyHandle, SessionHandle},
12+
handles::{KeyHandle, ObjectHandle, SessionHandle},
1313
interface_types::{
1414
algorithm::{HashingAlgorithm, PublicAlgorithm},
1515
ecc::EccCurve,
1616
key_bits::RsaKeyBits,
1717
resource_handles::Hierarchy,
1818
},
1919
structures::{
20-
Auth, CreateKeyResult, Data, Digest, EccPoint, EccScheme, Public, PublicBuilder,
20+
Auth, CreateKeyResult, Data, Digest, EccPoint, EccScheme, Name, Public, PublicBuilder,
2121
PublicEccParametersBuilder, PublicKeyRsa, PublicRsaParametersBuilder, RsaExponent,
2222
RsaScheme, Signature, SignatureScheme, SymmetricDefinitionObject, VerifiedTicket,
2323
},
@@ -398,6 +398,12 @@ impl TransientKeyContext {
398398
Ok(key_material)
399399
}
400400

401+
/// Gets the name of the root key of the TransientKeyContext
402+
pub fn get_root_key_name(&mut self) -> Result<Name> {
403+
let obj_handle: ObjectHandle = self.root_key_handle.into();
404+
self.context.tr_get_name(obj_handle)
405+
}
406+
401407
/// Sets the encrypt and decrypt flags on the main session used by the context.
402408
///
403409
/// # Errors

0 commit comments

Comments
 (0)