apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <di...@webweaving.org>
Subject Re: [Patch] Apple CommonCrypto implementation for apr_crypto
Date Wed, 03 Oct 2012 12:46:42 GMT

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;
+        }


Mime
View raw message