tls: added a readme for openssl_mutex_shared
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 12 Apr 2019 07:03:58 +0000 (09:03 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 12 Apr 2019 07:03:58 +0000 (09:03 +0200)
src/modules/tls/utils/openssl_mutex_shared/README.md [new file with mode: 0644]

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 (file)
index 0000000..9f2e9c5
--- /dev/null
@@ -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'
+```