pyca/cryptography — pull request #485 by reaperhulk (2014-01-19 23:33:21+00:00)
Title: Add cipher bindings for CommonCrypto

These bindings will fail on 10.7 at the moment. One temporary fix for this would be to simply modify our ```is_available()``` to return false on OS X < 10.8 (and iOS < 6 whenever we can actually test there) like the following:

```python
def is_available(cls):
uname = platform.uname()
kernel_major_version = int(uname[2].split(".")[0])
# kernel_major_version maps to OS X version:
# 10.7 == 11
# 10.8 == 12
# 10.9 == 13
return (uname[0] == "Darwin" and kernel_major_version >= 12)
```

Thoughts?

Ultimately we'll need to compile properly on 10.7 and disable features that are unavailable (like GCM) but I'd rather not block our initial version on that. Especially since I don't have a decent 10.7 test environment built yet.