Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHA-256 Updates in plugin.apple.iap for receiptDecrypted method #754

Open
fahadmirzamobizion opened this issue Jan 8, 2025 · 5 comments

Comments

@fahadmirzamobizion
Copy link

Shift SHA-1 to SHA-256 in receiptDecrypted method

Apple has announced that starting January 24, 2025, the SHA-1 intermediate certificate used for signing App Store receipts will expire. As part of this transition, Apple is moving to SHA-256 for certificate validation and cryptographic purposes.
We need to update the receiptDecrypted method in plugin.apple.iap to shift the certificate validation process from SHA-1 to SHA-256 for receipt validation.

Target platform and where build was made:

  • Device: [All iPhones, iPads]
  • OS: [All iOS]
@sekodev
Copy link
Contributor

sekodev commented Jan 14, 2025

Announcement from Apple @Shchvova is that a quick fix?

@Shchvova
Copy link
Contributor

Setup is a pain. But in the nutshell idea is to update this file
https://github.com/coronalabs/com.coronalabs-plugin.apple.iap/blob/master/src/shared/IAPCryptoHelper.m

According to the doc https://developer.apple.com/documentation/technotes/tn3138-handling-app-store-receipt-signing-certificate-changes

I think only initialization has to change.
I'll do it this week.

@Shchvova
Copy link
Contributor

Also, may be just throw it out and just use new StoreKit provided functions ¯_(ツ)_/¯
Because the old method relies on antiquated openssl plugin QQ

@alanflickgames
Copy link

So that I better understand what this means for us:
When we currently get a transaction object (which includes a transaction.receipt) in a purchase callback, has this already been through the SHA-1 decryption? Or does this change only affect devs who handle receipts some other way?

@Shchvova
Copy link
Contributor

This only changes verification if you are using helper through store.receiptDecrypted(). I hope to update plugin tonight

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

No branches or pull requests

4 participants