Skip to content

Commit 6a0e6c2

Browse files
committed
enforce attest key for new pairings when supported
1 parent 5f0f27b commit 6a0e6c2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/src/main/java/app/attestation/auditor/AttestationProtocol.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,11 @@ private static Verified verifyStateless(final Certificate[] certificates,
876876
attestKey = true;
877877
} catch (final Attestation.KeyDescriptionMissingException e) {}
878878

879+
// enforce attest key for new pairings with devices supporting it
880+
if (!hasPersistentKey && attestationVersion >= 100 && !attestKey) {
881+
throw new GeneralSecurityException("missing per-pairing attest key for device supporting it");
882+
}
883+
879884
for (int i = 2; i < certificates.length; i++) {
880885
try {
881886
new Attestation((X509Certificate) certificates[i]);

0 commit comments

Comments
 (0)