I'm having trouble incorporating OpenSSL to my MacOS app for validating apple's receipt. Here's what I get:
dyld: Library not loaded: /usr/local/ssl/lib/libcrypto.1.0.0.dylib
Here's what I'm doing:
I'm using this script to compile my OpenSSL lib:
#!/bin/bash
OPENSSL_VERSION="1.0.1e"
curl -O -L http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_i386
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_x86_64
cd openssl_i386
./Configure darwin-i386-cc -shared
make
cd ../
cd openssl_x86_64
./Configure darwin64-x86_64-cc -shared
make
cd ../
lipo -create openssl_i386/libcrypto.dylib openssl_x86_64/libcrypto.dylib -output libcrypto.dylib
lipo -create openssl_i386/libssl.dylib openssl_x86_64/libssl.dylib -output libssl.dylib
rm openssl-$OPENSSL_VERSION.tar.gz
Which gives me libssl.dylib
and libcrypto.dylib
Then I run pod install
with my podfile:
target 'MyApp' do
use_frameworks!
pod 'OpenSSL', '~> 1.0'
end
I then try to run my project just to get:
dyld: Library not loaded: /usr/local/ssl/lib/libcrypto.1.0.0.dylib
Referenced from: /Users/me/Source/myApp/DerivedData/myApp/Build/Products/Debug/myApp.app/Contents/MacOS/myApp
Reason: image not found
I understand I didn't add the librypto lib yet, but why does it try to find it in my /usr/local/ssl/lib/
? Where should I place it?