INNER CODE UNIT · Java
appVersion
GrapheneOS/AttestationServer · src/main/java/app/attestation/server/AttestationProtocol.java:527
final int appVersion = Math.toIntExact(info.version); // int for compatibility
if (appVersion < AUDITOR_APP_MINIMUM_VERSION) {
throw new GeneralSecurityException("Auditor app is too old: " + appVersion);
}
final AuthorizationList teeEnforced = attestation.teeEnforced;
// verified boot security checks
final RootOfTrust rootOfTrust = teeEnforced.rootOfTrust.orElse(null);
if (rootOfTrust == null) {
throw new GeneralSecurityException("missing root of trust");
}
if (!rootOfTrust.deviceLocked) {
throw new GeneralSecurityException("device is not locked");
}
final RootOfTrust.VerifiedBootState verifiedBootState = rootOfTrust.verifiedBootState;
final String verifiedBootKey = BaseEncoding.base16().encode(rootOfTrust.verifiedBootKey);
final DeviceInfo device;