[sr-dev] git:master:4c0aa78b: tls: added a readme for openssl_mutex_shared

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 15 08:38:39 CEST 2019


Module: kamailio
Branch: master
Commit: 4c0aa78b057b155c2f2b224457790169f5bf8eda
URL: https://github.com/kamailio/kamailio/commit/4c0aa78b057b155c2f2b224457790169f5bf8eda

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-04-12T09:03:58+02:00

tls: added a readme for openssl_mutex_shared

---

Added: src/modules/tls/utils/openssl_mutex_shared/README.md

---

Diff:  https://github.com/kamailio/kamailio/commit/4c0aa78b057b155c2f2b224457790169f5bf8eda.diff
Patch: https://github.com/kamailio/kamailio/commit/4c0aa78b057b155c2f2b224457790169f5bf8eda.patch

---

diff --git a/src/modules/tls/utils/openssl_mutex_shared/README.md b/src/modules/tls/utils/openssl_mutex_shared/README.md
new file mode 100644
index 0000000000..9f2e9c57e3
--- /dev/null
+++ b/src/modules/tls/utils/openssl_mutex_shared/README.md
@@ -0,0 +1,53 @@
+# OpenSSL Shared Mutex #
+
+This is a shared library required as a short term workaround for using Kamailio
+with OpenSSL (libssl) v1.1. It has to be pre-loaded before starting Kamailio.
+
+In v1.1, libssl does not allow setting custom locking functions, using internally
+pthread mutexes and rwlocks, but they are not initialized with process shared
+option (PTHREAD_PROCESS_SHARED), which can result in blocking Kamailio worker
+processes.
+
+## Installation ##
+
+By default, it is installed when the tls module is installed.
+
+It can be installed manually, in this folder execute:
+
+```
+make
+make install
+```
+
+It is installed at the same place where Kamailio deploys the directory with
+modules.
+
+For example, when installing from sources on a 64b system, the location is:
+
+```
+/usr/local/lib64/kamailio/openssl_mutex_shared/openssl_mutex_shared.so
+```
+
+For Debian packing, the location is like:
+
+```
+/usr/lib/x86_64-linux-gnu/kamailio/openssl_mutex_shared/openssl_mutex_shared.so
+```
+
+## Usage ##
+
+Use LD_PRELOAD to tell the linker to preload this shared object before starting
+Kamailio.
+
+Example, when Kamailio was installed from sources:
+
+```
+LD_PRELOAD=/usr/local/lib64/kamailio/openssl_mutex_shared/openssl_mutex_shared.so; \
+  /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg
+```
+
+If using systemd, add to service file:
+
+```
+Environment='LD_PRELOAD=/usr/local/lib64/kamailio/openssl_mutex_shared/openssl_mutex_shared.so'
+```




More information about the sr-dev mailing list