Skip to content

Commit

Permalink
tls: proper check of libssl versions used for compilation and availab…
Browse files Browse the repository at this point in the history
…le on system

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

(cherry picked from commit c38b4c7)
(cherry picked from commit 253909b)
(cherry picked from commit 5632abc)
(cherry picked from commit 0a5f99b)
(cherry picked from commit 35c3099)
  • Loading branch information
miconda authored and linuxmaniac committed Sep 28, 2016
1 parent e9fd10a commit 0bb7735
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/tls/tls_init.c
Expand Up @@ -503,8 +503,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 ser tls module "
"was compiled with: installed \"%s\" (0x%08lx), compiled "
Expand Down

0 comments on commit 0bb7735

Please sign in to comment.