diff --git a/protocol/attestation_androidkey.go b/protocol/attestation_androidkey.go index b8551ca8..95c9e83d 100644 --- a/protocol/attestation_androidkey.go +++ b/protocol/attestation_androidkey.go @@ -111,7 +111,7 @@ func verifyAndroidKeyFormat(att AttestationObject, clientDataHash []byte) (strin } // Verify that the attestationChallenge field in the attestation certificate extension data is identical to clientDataHash. - if 0 != bytes.Compare(decoded.AttestationChallenge, clientDataHash) { + if !bytes.Equal(decoded.AttestationChallenge, clientDataHash) { return "", nil, ErrAttestationFormat.WithDetails("Attestation challenge not equal to clientDataHash") }