oscrypto: oscrypto segfaults on catalina

I’ve come here after an all-day debugging session. tl;dr I think oscrypto is picking up the wrong SSL backend for catalina (OS X 10.15.1) which causes a crash.

There’s some workarounds as documented here: https://forums.developer.apple.com/thread/119429 Though that seems pretty gnarly.

Specifically I’m finding it failing in _libcrypto_cffi:

libcrypto_path = _backend_config().get('libcrypto_path')
if libcrypto_path is None:
    libcrypto_path = find_library('crypto')
if not libcrypto_path:
    raise LibraryNotFoundError('The library libcrypto could not be found')

try:
    vffi = FFI()
    vffi.cdef("const char *SSLeay_version(int type);")
    version_string = vffi.string(vffi.dlopen(libcrypto_path).SSLeay_version(0)).decode('utf-8') #### fails here
except (AttributeError):
    vffi = FFI()
    vffi.cdef("const char *OpenSSL_version(int type);")
    version_string = vffi.string(vffi.dlopen(libcrypto_path).OpenSSL_version(0)).decode('utf-8')

I suspect we are just picking a version that makes Catalina extremely upset, and so if we can pick a pinned version that would be better.

I posted something similar here: https://github.com/snowflakedb/snowflake-connector-python/issues/235

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (15 by maintainers)

Commits related to this issue

Most upvoted comments

This fix was included with the 1.1.1 release

I just need the CI on master to pass. I updated the CI config to pull in some revised matrix assignments across different CI providers that I made for asn1crypto. The major benefit being running the tests on 10.15 via GitHub Actions, however something is broken in regards to Circle and the macOS tests there. I’ll need to make sure those look good before the next release.