We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8df9dc5 commit 2c8ca66Copy full SHA for 2c8ca66
src/pyelliptic/openssl.py
@@ -289,7 +289,12 @@ def __init__(self, library):
289
self.HMAC.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int,
290
ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p]
291
292
- self.PKCS5_PBKDF2_HMAC = self._lib.PKCS5_PBKDF2_HMAC
+ try:
293
+ self.PKCS5_PBKDF2_HMAC = self._lib.PKCS5_PBKDF2_HMAC
294
+ except:
295
+ # The above is not compatible with all versions of OSX.
296
+ self.PKCS5_PBKDF2_HMAC = self._lib.PKCS5_PBKDF2_HMAC_SHA1
297
+
298
self.PKCS5_PBKDF2_HMAC.restype = ctypes.c_int
299
self.PKCS5_PBKDF2_HMAC.argtypes = [ctypes.c_void_p, ctypes.c_int,
300
ctypes.c_void_p, ctypes.c_int,
0 commit comments