Skip to content

Commit

Permalink
Uncrash android-key attestation as well
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Apr 10, 2019
1 parent 229507f commit c923d39
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ public Optional<AttestationTrustResolver> trustResolver() {
case ATTESTATION_CA:
case BASIC:
switch (attestation.getFormat()) {
case "android-key":
case "android-safetynet":
case "fido-u2f":
case "packed":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,18 @@ class RelyingPartyRegistrationSpec extends FunSpec with Matchers with GeneratorD
result.getKeyId.getId should equal (RegistrationTestData.NoneAttestation.Default.response.getId)
}

it("accept TPM attestations but reports they're untrusted.") {
it("accept android-key attestations but report they're untrusted.") {
val result = rp.finishRegistration(FinishRegistrationOptions.builder()
.request(request)
.response(RegistrationTestData.AndroidKey.BasicAttestation.response)
.build()
)

result.isAttestationTrusted should be (false)
result.getKeyId.getId should equal (RegistrationTestData.AndroidKey.BasicAttestation.response.getId)
}

it("accept TPM attestations but report they're untrusted.") {
val result = rp.finishRegistration(FinishRegistrationOptions.builder()
.request(request)
.response(RegistrationTestData.Tpm.PrivacyCa.response)
Expand Down

0 comments on commit c923d39

Please sign in to comment.