[sr-dev] [kamailio/kamailio] Kamailio 5.2.2 - Segmentation fault in libcrypto.so.1.1 (#1860)

shaunjstokes notifications at github.com
Fri May 10 07:27:30 CEST 2019


These are roughly the steps that I've followed to switch to OpenSSL 1.0.2r and rebuild Kamailio TLS module. Hope this helps!

First of all you need to make and install OpenSSL 1.0.2r from source.

	sudo apt install build-essential checkinstall zlib1g-dev -y

	cd /usr/src

	wget https://www.openssl.org/source/openssl-1.0.2r.tar.gz

	tar -xvzf openssl-1.0.2r.tar.gz

	cd openssl-1.0.2r

	./config -d --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib

	make
	make test

	make install

	nano /etc/ld.so.conf.d/openssl-1.0.2r.conf
	
Add this line and save:
/usr/local/ssl/lib

	sudo ldconfig -v

	mv /usr/bin/c_rehash /usr/bin/c_rehash.BEKUP
	mv /usr/bin/openssl /usr/bin/openssl.BEKUP

	export PATH=$PATH:/usr/local/ssl/bin

Link binaries to path:
	sudo ln -s /usr/local/ssl/bin/c_rehash /usr/bin/c_rehash
	sudo ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl

Restart.
	sudo shutdown -r now
	
Check OpenSSL path, should return '/usr/bin/openssl'.
	which openssl

Check OpenSSL version, should return 'OpenSSL 1.0.2r  26 Feb 2019'
	openssl version

Modify '/usr/src/kamailio/src/modules/tls/makefile'.

Changed this:
	ifneq ($(SSL_BUILDER),)
		DEFS += $(shell $(SSL_BUILDER) --cflags)
		LIBS += $(shell $(SSL_BUILDER) --libs)
	else
		DEFS += -I$(LOCALBASE)/ssl/include
		LIBS += -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib \
				-L$(LOCALBASE)/lib64 -L$(LOCALBASE)/ssl/lib64 \
				-lssl -lcrypto
		# NOTE: depending on the way in which libssl was compiled you might
		#       have to add -lz -lkrb5   (zlib and kerberos5).
		#       E.g.: make TLS_HOOKS=1 TLS_EXTRA_LIBS="-lz -lkrb5"
	endif
	
To this:
	DEFS+=	-I/usr/local/ssl/include
	LIBS+=	-L/usr/local/ssl/lib \
			-lssl -lcrypto
			
Make clean, make and make install:
	cd /usr/src/kamailio/src/modules/tls
	make clean
	make
	make install

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1860#issuecomment-491161003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190509/b345e91d/attachment.html>


More information about the sr-dev mailing list