Skip to content

Fix Xcode receipt parsing with strict ASN.1 lengths#419

Open
kiwigitops wants to merge 1 commit into
apple:mainfrom
kiwigitops:fix-xcode-receipt-jsrsasign-length
Open

Fix Xcode receipt parsing with strict ASN.1 lengths#419
kiwigitops wants to merge 1 commit into
apple:mainfrom
kiwigitops:fix-xcode-receipt-jsrsasign-length

Conversation

@kiwigitops

Copy link
Copy Markdown

Summary

  • compute the synthetic value length for Xcode indefinite-length receipts from the value offset instead of the tag offset
  • keeps extractTransactionIdFromAppReceipt compatible with the stricter ASN.1 length checks in jsrsasign >= 11.1.2

Closes #417.

Testing

  • reproduced the two failing Xcode receipt tests with jsrsasign@11.1.3 before the fix
  • npx jest tests/unit-tests/receipt_utility.test.ts --runInBand
  • npm run build
  • git diff --check

@kiwigitops

Copy link
Copy Markdown
Author

Quick bump on this. The jsrsasign length issue is still reproducible without the offset fix, and I am happy to adjust the receipt parsing change if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReceiptUtility.extractTransactionIdFromAppReceipt throws "too short ASN.1 value" on Xcode receipts with jsrsasign >= 11.1.2

1 participant