Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replace OpenSSL dependence with Common Crypto? (Mac App Store Receipt Validation)

My understanding is that OpenSSL is deprecated in OSX 10.7 in favor of Common Crypto, but I can't seem to get a good handle on how to transition from OpenSSL code to Common Crypto code. In particular, I'm looking at App Store receipt validation with ValidateStoreReceipt. I started by trying to find a way to get at the contents of the PKCS#7 container, which seems to be the first step in dictionaryWithAppStoreReceipt, but I couldn't find any documentation on how to do it.

Is it possible to rewrite this code so as not to depend on OpenSSL? If so, how? Is there documentation or a tutorial that I've missed?

like image 831
Isaac Avatar asked Oct 23 '22 18:10

Isaac


1 Answers

There is no need to stop using OpenSSL. What is deprecated is the OpenSSL dynamic library, you can still obtain the static library/source from openssl.org and statically link it to your code.

The reason given by Apple for the deprecation is that OpenSSL themselves advise against dynamic linking as the library changes too much between versions. By statically linking your code will always use the version of the library you built with and not a later, possibly incompatible version, currently installed on the system.

like image 118
CRD Avatar answered Nov 03 '22 19:11

CRD