diff options
author | Ayrx <terrycwk1994@gmail.com> | 2014-03-06 17:54:45 +0800 |
---|---|---|
committer | Ayrx <terrycwk1994@gmail.com> | 2014-03-06 17:54:45 +0800 |
commit | 9ec8ed70a3bbbecc43e6c27714042e2abe9a3fc0 (patch) | |
tree | 7be9d17f8235d40b3b4a28460e8e66f164c7f847 /cryptography | |
parent | 1e8aa9b09351bf0fb47bed24defc4d9f37560e31 (diff) | |
download | cryptography-9ec8ed70a3bbbecc43e6c27714042e2abe9a3fc0.tar.gz cryptography-9ec8ed70a3bbbecc43e6c27714042e2abe9a3fc0.tar.bz2 cryptography-9ec8ed70a3bbbecc43e6c27714042e2abe9a3fc0.zip |
Added check to turn of CC backend for OS X version < 10.8
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/hazmat/bindings/commoncrypto/binding.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/commoncrypto/binding.py b/cryptography/hazmat/bindings/commoncrypto/binding.py index 45c0eaad..07d9cc6d 100644 --- a/cryptography/hazmat/bindings/commoncrypto/binding.py +++ b/cryptography/hazmat/bindings/commoncrypto/binding.py @@ -14,6 +14,9 @@ from __future__ import absolute_import, division, print_function import sys +import platform + +from pkg_resources import parse_version from cryptography.hazmat.bindings.utils import build_ffi @@ -46,4 +49,13 @@ class Binding(object): @classmethod def is_available(cls): - return sys.platform == "darwin" + if sys.platform == "darwin": + version = parse_version(platform.mac_ver()[0]) + if version < parse_version("10.8"): + return False + + else: + return True + + else: + return False |