Repository: pyca/cryptography

Issue:
OpenSSL bindings don't work on OS X
```
$ py.test -x
======================================== test session starts =========================================
platform darwin -- Python 2.7.5 -- pytest-2.5.0
plugins: cache, cov, xdist
collecting 0 items / 1 errors
=============================================== ERRORS ===============================================
________________________________ ERROR collecting tests/test_utils.py ________________________________
tests/conftest.py:2: in pytest_generate_tests
>       from cryptography.hazmat.bindings import _ALL_BACKENDS
cryptography/hazmat/bindings/__init__.py:14: in <module>
>   from cryptography.hazmat.bindings import openssl
cryptography/hazmat/bindings/openssl/__init__.py:14: in <module>
>   from cryptography.hazmat.bindings.openssl.backend import backend
cryptography/hazmat/bindings/openssl/backend.py:455: in <module>
>   backend = Backend()
cryptography/hazmat/bindings/openssl/backend.py:71: in __init__
>       self._ensure_ffi_initialized()
cryptography/hazmat/bindings/openssl/backend.py:116: in _ensure_ffi_initialized
>           libraries=["crypto", "ssl"],
../../.virtualenvs/cryptography-dev/lib/python2.7/site-packages/cffi/api.py:339: in verify
>       lib = self.verifier.load_library()
../../.virtualenvs/cryptography-dev/lib/python2.7/site-packages/cffi/verifier.py:75: in load_library
>           return self._load_library()
../../.virtualenvs/cryptography-dev/lib/python2.7/site-packages/cffi/verifier.py:151: in _load_library
>       return self._vengine.load_library()
../../.virtualenvs/cryptography-dev/lib/python2.7/site-packages/cffi/vengine_cpy.py:138: in load_library
>           raise ffiplatform.VerificationError(error)
E           VerificationError: importing '/Users/alex_gaynor/projects/cryptography/cryptography/hazmat/bindings/openssl/__pycache__/_cffi__x29084331x3a5e42a8.so': dlopen(/Users/alex_gaynor/projects/cryptography/cryptography/hazmat/bindings/openssl/__pycache__/_cffi__x29084331x3a5e42a8.so, 2): Symbol not found: _ENGINE_set_default_pkey_asn1_meths
E             Referenced from: /Users/alex_gaynor/projects/cryptography/cryptography/hazmat/bindings/openssl/__pycache__/_cffi__x29084331x3a5e42a8.so
E             Expected in: flat namespace
E            in /Users/alex_gaynor/projects/cryptography/cryptography/hazmat/bindings/openssl/__pycache__/_cffi__x29084331x3a5e42a8.so
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================== 1 error in 1.06 seconds =======================================
[08:27:28] (cryptography-dev) ~/p/cryptography (master)
$
```

Looks to be a missing symbol.



Discussion:

Resolving patch:
diff --git a/cryptography/hazmat/bindings/openssl/engine.py b/cryptography/hazmat/bindings/openssl/engine.py
--- a/cryptography/hazmat/bindings/openssl/engine.py
+++ b/cryptography/hazmat/bindings/openssl/engine.py
@@ -46,8 +46,6 @@
 int ENGINE_set_default_RAND(ENGINE *);
 int ENGINE_set_default_ciphers(ENGINE *);
 int ENGINE_set_default_digests(ENGINE *);
-int ENGINE_set_default_pkey_meths(ENGINE *);
-int ENGINE_set_default_pkey_asn1_meths(ENGINE *);
 """
 
 MACROS = """


Test patch: