The developer figured it out. It doesn't match "the nonce" because Apple isn't using "the nonce" for ACME.
Apple is using the challenge token. The challenge token hashes to an exact match of the freshness code OID.
From device-attest-01:
{
"type": "device-attest-01",
"url": "https://example.com/acme/chall/Rg5dV14Gh1Q",
"status": "pending",
"token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA"
}
{
"protected": base64url({
"alg": "ES256",
"kid": "https://example.com/acme/acct/evOfKhNU60wg",
"nonce": "SS2sSl1PtspvFZ08kNtzKd",
"url": "https://example.com/acme/chall/Rg5dV14Gh1Q"
}),
"payload": base64url({
"attObj": base64url(/* WebAuthn attestation object */),
}),
"signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
}
It may be the case that the term "nonce" is being used too loosely, which unfortunately is a dangerous thing when it has an actual definition in this protocol. We lost the best part of a week to this.
ACME YAML needs to be corrected.
I can't quite re-find the other instances I thought I saw claiming it's a hash of the nonce.
I would suggest this is made clearer in the published documentation. For example, this Apple Platform security guide should simply address the fact that it's a SHA256 hash of the token from the device-attest-01 challenge. I would have perceived the freshness code to be this final hash, whereas this document appears to describe the token as the freshness code that just happens to be hashed.
I don't know if the reason we got here was because you are using the relevant nonce for the DeviceInformation query that an MDM server can generate but it would appear to be vital that there is a clear distinction between the resultant 1.2.840.113635.100.8.11.1 for an ACME request with managed device attestation.