INNER CODE UNIT · Java
UNKNOWN_VALUE
GrapheneOS/AttestationServer · src/main/java/app/attestation/server/AttestationProtocol.java:770
static final int UNKNOWN_VALUE = -1;
static final int INVALID_VALUE = -2;
}
private static void verify(final byte[] fingerprint,
final Cache<ByteBuffer, Boolean> pendingChallenges, final long userId,
final boolean paired, final ByteBuffer signedMessage, final byte[] signature,
final Certificate[] attestationCertificates, final boolean userProfileSecure,
final boolean accessibility, final boolean deviceAdmin,
final boolean deviceAdminNonSystem, final boolean adbEnabled,
final boolean addUsersWhenLocked, final boolean enrolledBiometrics,
final boolean systemUser, final SecurityStateExt securityStateExt)
throws GeneralSecurityException, IOException, SQLiteException {
final String fingerprintHex = BaseEncoding.base16().encode(fingerprint);
final byte[] currentFingerprint = getFingerprint(attestationCertificates[0]);
final boolean hasPersistentKey = !Arrays.equals(currentFingerprint, fingerprint);
if (paired && !hasPersistentKey) {
throw new GeneralSecurityException("must be authenticated with subscribeKey for initial verification");