[sr-dev] git:master:c38b4c73: tls: proper check of libssl versions used for compilation and available on system

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 7 15:25:25 CEST 2016


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-06-07T15:21:06+02:00

tls: proper check of libssl versions used for compilation and available on system

- shift out the last 12bits, being the patch version and status (see man
  SSLeay)
- reported by Victor Seva, GH #662

---

Modified: modules/tls/tls_init.c

---

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

---

diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c
index d7f3cef..e0bbb0b 100644
--- a/modules/tls/tls_init.c
+++ b/modules/tls/tls_init.c
@@ -545,8 +545,10 @@ int init_tls_h(void)
 #endif
 	ssl_version=SSLeay();
 	/* check if version have the same major minor and fix level
-	 * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) */
-	if ((ssl_version>>8)!=(OPENSSL_VERSION_NUMBER>>8)){
+	 * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not)
+	 * - values is represented as 0xMMNNFFPPS: major minor fix patch status
+	 *   0x00090705f == 0.9.7e release */
+	if ((ssl_version>>12)!=(OPENSSL_VERSION_NUMBER>>12)){
 		LOG(L_CRIT, "ERROR: tls: init_tls_h: installed openssl library "
 				"version is too different from the library the Kamailio tls module "
 				"was compiled with: installed \"%s\" (0x%08lx), compiled "




More information about the sr-dev mailing list