适用于 iOS7 的 Apple 收据验证.将 libcrypto.a 和 libssl.a 库添加到 XCode 项目



我需要验证应用内购买收据。苹果发布了一种新的收据方法,现在收据可以存储在NSBundle的设备上。它要求将OpenSSL和ASN1添加到XCode项目中,以便对收据进行编码和验证。我一直在网上寻找可能的解决方案。没有运气(。如果有人已经这样做了,请帮忙。1. 我需要使用 OpenSSL 和 ASN1,添加库 libcrypto.a 和 libssl.a2. 编写用于验证 iOS7 收据的代码。

我从这里使用了ASN1:http://sourceforge.net/projects/asn1c/

这是我用于OpenSSL的: http://www.cvursache.com/2013/08/13/How-To-Build-openssl-For-iOS/

至于使用OpenSSL和ASN1的深层信息,我想知道你是否找到一个全面的来源。我从各种来源拼凑出我能拼凑的东西。我看了看:

  1. WWDC 2013 会议"使用收据保护您的数字销售"。
  2. https://github.com/rmaddy/VerifyStoreReceiptiOS
  3. http://www.umich.edu/~x509/ssleay/x509_store.html
  4. https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html
  5. 如何在opensl中打印BIO对象或从ASN1_TYPE对象打印时间
  6. http://lionet.info/asn1c/asn1c-usage.html#SECTION02211000000000000000
  7. https://developer.apple.com/library/mac/releasenotes/General/ValidateAppStoreReceipt/Introduction.html
  8. https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Introduction.html
  9. IA5STRING ASN.1 编码格式:应用内购买收据验证和解码
  10. 如何格式化将字符串 2013-01-27T02:31:47+08:00 转换为 NSDate
  11. http://luca.ntop.org/Teaching/Appunti/asn1.html

我想你会在这里找到你要找的东西:

http://ataugeron.github.io/blog/blog/2013/09/23/app-store-receipt-validation-on-ios-7/

最新更新