File tree 1 file changed +22
-16
lines changed
tss-esapi/src/structures/buffers
1 file changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -329,14 +329,14 @@ impl Public {
329
329
match self {
330
330
Public :: Rsa {
331
331
object_attributes, ..
332
- } => * object_attributes ,
333
- Public :: KeyedHash {
332
+ }
333
+ | Public :: KeyedHash {
334
334
object_attributes, ..
335
- } => * object_attributes ,
336
- Public :: Ecc {
335
+ }
336
+ | Public :: Ecc {
337
337
object_attributes, ..
338
- } => * object_attributes ,
339
- Public :: SymCipher {
338
+ }
339
+ | Public :: SymCipher {
340
340
object_attributes, ..
341
341
} => * object_attributes,
342
342
}
@@ -346,27 +346,33 @@ impl Public {
346
346
pub fn name_hashing_algorithm ( & self ) -> HashingAlgorithm {
347
347
match self {
348
348
Public :: Rsa {
349
- object_attributes : _,
350
349
name_hashing_algorithm,
351
350
..
352
- } => * name_hashing_algorithm,
353
- Public :: KeyedHash {
354
- object_attributes : _,
351
+ }
352
+ | Public :: KeyedHash {
355
353
name_hashing_algorithm,
356
354
..
357
- } => * name_hashing_algorithm,
358
- Public :: Ecc {
359
- object_attributes : _,
355
+ }
356
+ | Public :: Ecc {
360
357
name_hashing_algorithm,
361
358
..
362
- } => * name_hashing_algorithm,
363
- Public :: SymCipher {
364
- object_attributes : _,
359
+ }
360
+ | Public :: SymCipher {
365
361
name_hashing_algorithm,
366
362
..
367
363
} => * name_hashing_algorithm,
368
364
}
369
365
}
366
+
367
+ /// Returns the auth policy digest.
368
+ pub fn auth_policy ( & self ) -> & Digest {
369
+ match self {
370
+ Public :: Rsa { auth_policy, .. }
371
+ | Public :: KeyedHash { auth_policy, .. }
372
+ | Public :: Ecc { auth_policy, .. }
373
+ | Public :: SymCipher { auth_policy, .. } => auth_policy,
374
+ }
375
+ }
370
376
}
371
377
372
378
impl From < Public > for TPM2B_PUBLIC {
You can’t perform that action at this time.
0 commit comments