Step 5: SHA256 hash of the public key failing

Hi. I'm trying to implement App Attest on my App and I followed the guidelines from https://developer.apple.com/documentation/devicecheck/validating_apps_that_connect_to_your_server but step 5 isn't waking.

I got an example from https://blog.restlesslabs.com/john/ios-app-attest to implement all 9 steps using Python.

Is there any example of this server-side implementation so I can double check what's wrong? PS: I saw one in Kotlin but that doesn't help me.

I'm testing on an iPhone X and I can get the key identifier, the challenge and the attestation object. All steps except 5 are working (well, I had to base64 decode the identifier for step 9).

Please, any help is appreciated.

Regards, Cassio

Replies

Found the problem. It was related to:

  1. The certificate isn't a regular one - it is X962
  2. Need to use another library to work with this certificate.

If anyone interested, here is a link for a working server-side code https://github.com/pprindeville/python-appattest/blob/main/appattest/appattest.py