-
-
Hi! I'm Michael Tyson, and I run A Tasty Pixel from our home in the hills of Melbourne, Australia. I write on a variety of technology and software development topics. I've also recently returned from a 3.5-year journey around Europe in a motorhome.
I make Loopy, the live-looper for iOS, Audiobus, the app-to-app audio platform, and The Amazing Audio Engine, the iOS audio framework.
Easy inclusion of OpenSSL into iOS projects
Oddly, iOS doesn’t provide any OpenSSL implementation at all — If you want to do anything with crypto (like checking signatures, checksumming, etc.), you have to build in the library yourself.
I came across a great XCode project wrapper for OpenSSL yesterday, by Stephen Lombardo. This is an XCode project file that contains a target to build OpenSSL from source, and works with both Mac and iOS projects. I made some modifications to it, in order to make it work by just dropping in the OpenSSL source tarball, without having to dirty up your source tree with the extracted OpenSSL distribution.
Here’s how to use it:
Library/openssl
within my project tree).On the Build tab for your project’s target, find the “Header Search Paths” option, and add the path:
(Assuming you’ve put openssl.xcodeproj at the path
Library/openssl
— adjust as necessary).Then, you can just import and use as normal (
#import <openssl/dsa.h>
, etc).Download it here