@@ -8,11 +8,9 @@ use crate::{
88 Error , Result , WrapperErrorKind ,
99} ;
1010use std:: convert:: TryFrom ;
11- //////////////////////////////////////////////////////////////////////////////////
1211/// Hierarchy
1312///
1413/// Enum describing the object hierarchies in a TPM 2.0.
15- //////////////////////////////////////////////////////////////////////////////////
1614#[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
1715pub enum Hierarchy {
1816 Owner ,
@@ -74,9 +72,9 @@ impl TryFrom<TpmHandle> for Hierarchy {
7472 }
7573}
7674
77- //////////////////////////////////////////////////////////////////////////////////
78- /// Enables
79- //////////////////////////////////////////////////////////////////////////////////
75+ // ////////////////////////////////////////////////////////////////////////////////
76+ // Enables
77+ // ////////////////////////////////////////////////////////////////////////////////
8078#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
8179pub enum Enables {
8280 Owner ,
@@ -143,9 +141,9 @@ impl TryFrom<TpmHandle> for Enables {
143141 }
144142}
145143
146- //////////////////////////////////////////////////////////////////////////////////
147- /// HierarchyAuth
148- //////////////////////////////////////////////////////////////////////////////////
144+ // ////////////////////////////////////////////////////////////////////////////////
145+ // HierarchyAuth
146+ // ////////////////////////////////////////////////////////////////////////////////
149147#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
150148pub enum HierarchyAuth {
151149 Owner ,
@@ -206,13 +204,13 @@ impl TryFrom<TpmHandle> for HierarchyAuth {
206204 }
207205 }
208206}
209- /// ///////////////////////////////////////////////////////////////////////////////
210- /// TODO: HierarchyPolicy
211- /// ///////////////////////////////////////////////////////////////////////////////
207+ // ///////////////////////////////////////////////////////////////////////////////
208+ // TODO: HierarchyPolicy
209+ // ///////////////////////////////////////////////////////////////////////////////
212210
213- //////////////////////////////////////////////////////////////////////////////////
214- /// Platform
215- //////////////////////////////////////////////////////////////////////////////////
211+ // ////////////////////////////////////////////////////////////////////////////////
212+ // Platform
213+ // ////////////////////////////////////////////////////////////////////////////////
216214#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
217215pub enum Platform {
218216 Platform ,
@@ -234,9 +232,9 @@ impl TryFrom<AuthHandle> for Platform {
234232 }
235233 }
236234}
237- //////////////////////////////////////////////////////////////////////////////////
238- /// Owner
239- //////////////////////////////////////////////////////////////////////////////////
235+ // ////////////////////////////////////////////////////////////////////////////////
236+ // Owner
237+ // ////////////////////////////////////////////////////////////////////////////////
240238#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
241239pub enum Owner {
242240 Owner ,
@@ -263,9 +261,9 @@ impl TryFrom<ObjectHandle> for Owner {
263261 }
264262 }
265263}
266- //////////////////////////////////////////////////////////////////////////////////
267- /// Endorsement
268- //////////////////////////////////////////////////////////////////////////////////
264+ // ////////////////////////////////////////////////////////////////////////////////
265+ // Endorsement
266+ // ////////////////////////////////////////////////////////////////////////////////
269267#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
270268pub enum Endorsement {
271269 Endorsement ,
@@ -292,9 +290,9 @@ impl TryFrom<ObjectHandle> for Endorsement {
292290 }
293291 }
294292}
295- //////////////////////////////////////////////////////////////////////////////////
296- /// Provision
297- //////////////////////////////////////////////////////////////////////////////////
293+ // ////////////////////////////////////////////////////////////////////////////////
294+ // Provision
295+ // ////////////////////////////////////////////////////////////////////////////////
298296#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
299297pub enum Provision {
300298 Owner ,
@@ -321,9 +319,9 @@ impl TryFrom<AuthHandle> for Provision {
321319 }
322320 }
323321}
324- //////////////////////////////////////////////////////////////////////////////////
325- /// Clear
326- //////////////////////////////////////////////////////////////////////////////////
322+ // ////////////////////////////////////////////////////////////////////////////////
323+ // Clear
324+ // ////////////////////////////////////////////////////////////////////////////////
327325#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
328326pub enum Clear {
329327 Owner ,
@@ -350,9 +348,9 @@ impl TryFrom<AuthHandle> for Clear {
350348 }
351349 }
352350}
353- //////////////////////////////////////////////////////////////////////////////////
354- /// NvAuth
355- //////////////////////////////////////////////////////////////////////////////////
351+ // ////////////////////////////////////////////////////////////////////////////////
352+ // NvAuth
353+ // ////////////////////////////////////////////////////////////////////////////////
356354#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
357355pub enum NvAuth {
358356 Platform ,
@@ -381,9 +379,9 @@ impl TryFrom<AuthHandle> for NvAuth {
381379 }
382380 }
383381}
384- //////////////////////////////////////////////////////////////////////////////////
385- /// Lockout
386- //////////////////////////////////////////////////////////////////////////////////
382+ // ////////////////////////////////////////////////////////////////////////////////
383+ // Lockout
384+ // ////////////////////////////////////////////////////////////////////////////////
387385#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
388386pub enum Lockout {
389387 Lockout ,
@@ -406,9 +404,9 @@ impl TryFrom<ObjectHandle> for Lockout {
406404 }
407405}
408406
409- //////////////////////////////////////////////////////////////////////////////////
410- /// NvIndex
411- //////////////////////////////////////////////////////////////////////////////////
407+ // ////////////////////////////////////////////////////////////////////////////////
408+ // NvIndex
409+ // ////////////////////////////////////////////////////////////////////////////////
412410#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
413411pub enum NvIndex {
414412 NvIndex ( NvIndexTpmHandle ) ,
@@ -428,9 +426,9 @@ impl From<NvIndex> for NvIndexTpmHandle {
428426 }
429427}
430428
431- //////////////////////////////////////////////////////////////////////////////////
432- /// AttachedComponent
433- //////////////////////////////////////////////////////////////////////////////////
429+ // ////////////////////////////////////////////////////////////////////////////////
430+ // AttachedComponent
431+ // ////////////////////////////////////////////////////////////////////////////////
434432#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
435433pub enum AttachedComponent {
436434 AttachedComponent ( AttachedComponentTpmHandle ) ,
@@ -450,8 +448,8 @@ impl From<AttachedComponent> for AttachedComponentTpmHandle {
450448 }
451449}
452450
453- //////////////////////////////////////////////////////////////////////////////////
451+ // ////////////////////////////////////////////////////////////////////////////////
454452// Act (authenticated timers)
455453//
456454// TODO: Figure out how to implement this. This is some kind of counter.
457- //////////////////////////////////////////////////////////////////////////////////
455+ // ////////////////////////////////////////////////////////////////////////////////
0 commit comments