Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

Commit f796f99

Browse files
committed
Manual merge for #33 now that 0.3.0 is out the door.
Better solution, but 5% riskier.
1 parent 6b83faf commit f796f99

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

chef/rsa.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
import six
22
import sys
33
from ctypes import *
4+
from ctypes.utils import find_library
45

56
if sys.platform == 'win32' or sys.platform == 'cygwin':
67
_eay = CDLL('libeay32.dll')
78
elif sys.platform == 'darwin':
89
_eay = CDLL('libcrypto.dylib')
910
else:
10-
# Patch for Amazon Linux
11-
import platform
12-
plat_name = platform.linux_distribution(supported_dists=['system'])[0]
13-
if 'Amazon' in plat_name:
14-
_eay = CDLL('libcrypto.so.10')
15-
else:
16-
_eay = CDLL('libcrypto.so')
11+
_eay = CDLL(find_library('crypto'))
1712

1813
#unsigned long ERR_get_error(void);
1914
ERR_get_error = _eay.ERR_get_error

0 commit comments

Comments
 (0)