madeye/shadowsocks-libev — pull request #51 by linusyang (2014-03-09 10:38:34+00:00)
Title: Support for Apple's CommonCrypto API

Instead of OpenSSL, Apple provides CommonCrypto API as a native crypto API for Darwin because [Apple insists OpenSSL cannot provide a _stable_ API](https://developer.apple.com/library/mac/documentation/security/conceptual/cryptoservices/GeneralPurposeCrypto/GeneralPurposeCrypto.html). CommonCrypto API is actually a wrapper of the _CoreCrypto_ module, which has __hardware accelerated__ crypto implementation (especially AES) for Mac and iOS devices.

So, this patch attempts to use CommonCrypto as a crypto backend in order to achieve potential better performance on Darwin platforms. But currently OpenSSL or PolarSSL library is _still needed_ for several functions missing in CommonCrypto.

Use `--enable-applecc` to enable the CommonCrypto API support. Patch is tested to work on OS X 10.9.2.