Skip to content

Commit

Permalink
add dedicated error message for Android bug with workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Jul 24, 2024
1 parent 5d7daaf commit 7da6539
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,9 @@ private static Verified verifyStateless(final Certificate[] certificates,
}
final AttestationPackageInfo info = infos.get(0);
final List<byte[]> signatureDigests = attestationApplicationId.signatureDigests;
if (signatureDigests.size() != 1) {
if (signatureDigests.size() == 0) {
throw new GeneralSecurityException("Auditor signing keys are missing from the attestation data. This is known to happen after a system_server crash causes a soft reboot, which can be resolved by a full reboot of the device.");
} else if (signatureDigests.size() != 1) {
throw new GeneralSecurityException("invalid number of Auditor app signing keys: " + signatureDigests.size());
}
final String signatureDigest = BaseEncoding.base16().encode(signatureDigests.get(0));
Expand Down

0 comments on commit 7da6539

Please sign in to comment.