salt: 2016.11.5 -> 2017.7.1, patch fix

The libcrypto patch didn't work well with `salt-ssh` (that code failed on
remote machines), so let's make Nix-based library lookup as fallback.

https://github.com/saltstack/salt/issues/43350
This commit is contained in:
danbst
2017-09-05 15:54:16 +03:00
parent 8502d94b31
commit a5b8c0c2de
2 changed files with 11 additions and 8 deletions

View File

@@ -1,11 +1,14 @@
diff --git a/salt/utils/rsax931.py b/salt/utils/rsax931.py
index 9eb1f4a..d764f7a 100644
index f827cc6db8..b728595186 100644
--- a/salt/utils/rsax931.py
+++ b/salt/utils/rsax931.py
@@ -36,7 +36,6 @@ def _load_libcrypto():
'libcrypto.so*'))
@@ -47,6 +47,9 @@ def _load_libcrypto():
lib = lib[0] if len(lib) > 0 else None
- if lib:
- return cdll.LoadLibrary(lib)
+ return cdll.LoadLibrary('@libcrypto@')
if lib:
return cdll.LoadLibrary(lib)
+ else:
+ return cdll.LoadLibrary('@libcrypto@')
+
raise OSError('Cannot locate OpenSSL libcrypto')