Friday, 27 September 2019

compiling outdated PHP yields core dump with OpenSSL functions. OpenSSL version mismatch?

I compiled OpenSSL 0.9.8x with these ./config options:

./config --prefix=/usr/local/openssl-0.9.8 --openssldir=/usr/local/openssl-0.9.8

I'm compiling my PHP version with these ./configure options (among others):

   --with-openssl=/usr/local/openssl-0.9.8
   --with-openssl-dir=/usr/local/openssl-0.9.8

The problem is that when I run a PHP script with openssl_public_encrypt I'm getting a segmentation fault.

Here's what gdb says:

Program terminated with signal 11, Segmentation fault.
#0  0x00007fd3381c5a48 in RSA_public_encrypt () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0

In /usr/local/openssl-0.9.8/lib/ there's libcrypto.so.0.9.8 so why isn't it using that?

Here's my OpenSSL Makefile:

https://pastebin.com/0QSqLCr8

Here's my PHP Makefile:

https://pastebin.com/dGmu0SYZ

Any ideas? Thanks!



from compiling outdated PHP yields core dump with OpenSSL functions. OpenSSL version mismatch?

No comments:

Post a Comment