Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vvb2060/KeyAttestation
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a92bc7ad277ff19fbe150cda66dc883f963034ac
Choose a base ref
..
head repository: vvb2060/KeyAttestation
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 26db9ebb67a2a1db3526735c65cda324ce9ae9e3
Choose a head ref
Showing with 40 additions and 12 deletions.
  1. +8 −12 app/src/main/java/io/github/vvb2060/keyattestation/attestation/Attestation.java
  2. +32 −0 app/src/main/res/raw/status.json
Original file line number Diff line number Diff line change
@@ -94,16 +94,12 @@ public static Attestation loadFromCertificate(X509Certificate x509Cert) throws C
}

public static String securityLevelToString(int attestationSecurityLevel) {
switch (attestationSecurityLevel) {
case KM_SECURITY_LEVEL_SOFTWARE:
return "Software";
case KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT:
return "TEE";
case KM_SECURITY_LEVEL_STRONG_BOX:
return "StrongBox";
default:
return "Unkown (" + attestationSecurityLevel + ")";
}
return switch (attestationSecurityLevel) {
case KM_SECURITY_LEVEL_SOFTWARE -> "Software";
case KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT -> "TEE";
case KM_SECURITY_LEVEL_STRONG_BOX -> "StrongBox";
default -> "Unknown (" + attestationSecurityLevel + ")";
};
}

public static String attestationVersionToString(int version) {
@@ -115,7 +111,7 @@ public static String attestationVersionToString(int version) {
case 100 -> "KeyMint 1.0";
case 200 -> "KeyMint 2.0";
case 300 -> "KeyMint 3.0";
default -> "Unkown (" + version + ")";
default -> "Unknown (" + version + ")";
};
}

@@ -130,7 +126,7 @@ public static String keymasterVersionToString(int version) {
case 100 -> "KeyMint 1.0";
case 200 -> "KeyMint 2.0";
case 300 -> "KeyMint 3.0";
default -> "Unkown (" + version + ")";
default -> "Unknown (" + version + ")";
};
}

32 changes: 32 additions & 0 deletions app/src/main/res/raw/status.json
Original file line number Diff line number Diff line change
@@ -199,6 +199,38 @@
"fc609574570c3e0a1d347e02a2ad6d4d" : {
"status": "REVOKED",
"reason": "SOFTWARE_FLAW"
},
"7355273169128314967" : {
"status": "REVOKED",
"reason": "KEY_COMPROMISE"
},
"5344612975616013951" : {
"status": "REVOKED",
"reason": "KEY_COMPROMISE"
},
"16166206677093325219" : {
"status": "REVOKED",
"reason": "KEY_COMPROMISE"
},
"15489222854939603791" : {
"status": "REVOKED",
"reason": "KEY_COMPROMISE"
},
"18154252358500841010" : {
"status": "REVOKED",
"reason": "KEY_COMPROMISE"
},
"12098947777634431853" : {
"status": "REVOKED",
"reason": "KEY_COMPROMISE"
},
"10997554208317698753" : {
"status": "REVOKED",
"reason": "KEY_COMPROMISE"
},
"12365028775357944392" : {
"status": "REVOKED",
"reason": "KEY_COMPROMISE"
}
}
}