@@ -32,35 +32,96 @@ type hostSecurityIntelCsme11Suite struct{}
3232var _ = Suite (& hostSecurityIntelCsme11Suite {})
3333
3434func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11GoodFVMEProfile (c * C ) {
35- err := CheckHostSecurityIntelBootGuardCSME11 (HfstsRegistersCsme11 {Hfsts6 : 0xC7E003CB })
35+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 16 }, HfstsRegistersCsme11 {
36+ Hfsts1 : 0x94000245 ,
37+ Hfsts6 : 0xC7E003CB ,
38+ })
3639 c .Check (err , IsNil )
3740}
3841
3942func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11GoodFVEProfile (c * C ) {
40- err := CheckHostSecurityIntelBootGuardCSME11 (HfstsRegistersCsme11 {Hfsts6 : 0xC7E002CB })
43+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 16 }, HfstsRegistersCsme11 {
44+ Hfsts1 : 0x94000245 ,
45+ Hfsts6 : 0xC7E002CB ,
46+ })
4147 c .Check (err , IsNil )
4248}
4349
50+ func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11Good13 (c * C ) {
51+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 13 }, HfstsRegistersCsme11 {
52+ Hfsts1 : 0x94000245 ,
53+ Hfsts6 : 0x87C003CB ,
54+ })
55+ c .Check (err , IsNil )
56+ }
57+
58+ func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11Good15 (c * C ) {
59+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 15 }, HfstsRegistersCsme11 {
60+ Hfsts1 : 0x94000245 ,
61+ Hfsts6 : 0xC7C003CB ,
62+ })
63+ c .Check (err , IsNil )
64+ }
65+
66+ func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11ErrMfgMode (c * C ) {
67+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 13 }, HfstsRegistersCsme11 {
68+ Hfsts1 : 0x94000255 ,
69+ Hfsts6 : 0x87C003CB ,
70+ })
71+ c .Check (err , ErrorMatches , `no hardware root-of-trust properly configured: system is in manufacturing mode` )
72+ c .Check (err , FitsTypeOf , & NoHardwareRootOfTrustError {})
73+ }
74+
75+ func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11ErrFPFsNotLocked (c * C ) {
76+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 15 }, HfstsRegistersCsme11 {
77+ Hfsts1 : 0x94000245 ,
78+ Hfsts6 : 0x87C003CB ,
79+ })
80+ c .Check (err , ErrorMatches , `no hardware root-of-trust properly configured: system is in manufacturing mode` )
81+ c .Check (err , FitsTypeOf , & NoHardwareRootOfTrustError {})
82+ }
83+
84+ func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11ErrNoManufLock (c * C ) {
85+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 16 }, HfstsRegistersCsme11 {
86+ Hfsts1 : 0x94000245 ,
87+ Hfsts6 : 0x87C003CB ,
88+ })
89+ c .Check (err , ErrorMatches , `no hardware root-of-trust properly configured: system is in manufacturing mode` )
90+ c .Check (err , FitsTypeOf , & NoHardwareRootOfTrustError {})
91+ }
92+
4493func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11ErrBootGuardDisabled (c * C ) {
45- err := CheckHostSecurityIntelBootGuardCSME11 (HfstsRegistersCsme11 {Hfsts6 : 0xD7E003CB })
94+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 16 }, HfstsRegistersCsme11 {
95+ Hfsts1 : 0x94000245 ,
96+ Hfsts6 : 0xD7E003CB ,
97+ })
4698 c .Check (err , ErrorMatches , `no hardware root-of-trust properly configured: BootGuard is disabled` )
4799 c .Check (err , FitsTypeOf , & NoHardwareRootOfTrustError {})
48100}
49101
50102func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11ErrInvalidProfile (c * C ) {
51- err := CheckHostSecurityIntelBootGuardCSME11 (HfstsRegistersCsme11 {Hfsts6 : 0xC7E0024A })
103+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 16 }, HfstsRegistersCsme11 {
104+ Hfsts1 : 0x94000245 ,
105+ Hfsts6 : 0xC7E0024A ,
106+ })
52107 c .Check (err , ErrorMatches , `no hardware root-of-trust properly configured: cannot determine BootGuard profile: invalid profile` )
53108 c .Check (err , FitsTypeOf , & NoHardwareRootOfTrustError {})
54109}
55110
56111func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11ErrUnsupportedNoFVMEProfile (c * C ) {
57- err := CheckHostSecurityIntelBootGuardCSME11 (HfstsRegistersCsme11 {Hfsts6 : 0xC7E00002 })
112+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 16 }, HfstsRegistersCsme11 {
113+ Hfsts1 : 0x94000245 ,
114+ Hfsts6 : 0xC7E00002 ,
115+ })
58116 c .Check (err , ErrorMatches , `no hardware root-of-trust properly configured: unsupported BootGuard profile` )
59117 c .Check (err , FitsTypeOf , & NoHardwareRootOfTrustError {})
60118}
61119
62120func (* hostSecurityIntelCsme11Suite ) TestCheckHostSecurityIntelBootGuardCSME11ErrUnsupportedVMProfile (c * C ) {
63- err := CheckHostSecurityIntelBootGuardCSME11 (HfstsRegistersCsme11 {Hfsts6 : 0xC7E0030A })
121+ err := CheckHostSecurityIntelBootGuardCSME11 (MeVersion {Major : 16 }, HfstsRegistersCsme11 {
122+ Hfsts1 : 0x94000245 ,
123+ Hfsts6 : 0xC7E0030A ,
124+ })
64125 c .Check (err , ErrorMatches , `no hardware root-of-trust properly configured: unsupported BootGuard profile` )
65126 c .Check (err , FitsTypeOf , & NoHardwareRootOfTrustError {})
66127}
0 commit comments