On 22 Sep 2012, at 15:33, Graham Leggett wrote: > http://developer.apple.com/library/mac/#documentation/security/Conceptual/cryptoservices/SecureNetworkCommunicationAPIs/SecureNetworkCommunicationAPIs.html > > The following patch adds a CommonCrypto implementation to the apr_crypto abstraction for users of OSX and iOS. Well done. Passes my somewhat esoteric test cases (well, it did not - but mine where broken). This intended to go into the main line ? Dw. + case (APR_KEY_AES_128): + key->algorithm = kCCAlgorithmAES128; + key->keyLen = kCCKeySizeAES128; + key->blockSize = kCCBlockSizeAES128; + if (mode == APR_MODE_CBC) { + key->ivSize = kCCBlockSizeAES128; + } + else { + key->options += kCCOptionECBMode; + key->ivSize = 0; + }