File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ sealed interface VerificationResult {
4848 val challenge : ByteString ,
4949 val securityLevel : SecurityLevel ,
5050 val verifiedBootState : VerifiedBootState ,
51+ val deviceLocked : Boolean ,
5152 val deviceInformation : ProvisioningInfoMap ? ,
5253 val attestedDeviceIds : DeviceIdentity ,
5354 ) : VerificationResult
@@ -305,12 +306,14 @@ constructor(
305306 minOf(keyDescription.attestationSecurityLevel, keyDescription.keyMintSecurityLevel)
306307 val rootOfTrust = keyDescription.hardwareEnforced.rootOfTrust
307308 val verifiedBootState = rootOfTrust?.verifiedBootState ? : VerifiedBootState .UNVERIFIED
309+ val deviceLocked = rootOfTrust?.deviceLocked ? : false
308310
309311 return VerificationResult .Success (
310312 pathValidationResult.publicKey,
311313 keyDescription.attestationChallenge,
312314 securityLevel,
313315 verifiedBootState,
316+ deviceLocked,
314317 deviceInformation,
315318 DeviceIdentity .parseFrom(keyDescription),
316319 )
Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ class VerifierTest {
8282 assertThat(result.securityLevel).isEqualTo(json.attestationSecurityLevel)
8383 assertThat(result.verifiedBootState)
8484 .isEqualTo(json.hardwareEnforced.rootOfTrust?.verifiedBootState)
85+ assertThat(result.deviceLocked)
86+ .isEqualTo(json.hardwareEnforced.rootOfTrust?.deviceLocked ? : false )
8587 }
8688
8789 enum class TestCase (val path : String , val timestamp : Instant ) {
You can’t perform that action at this time.
0 commit comments