I'm using an old version of ubuntu 10.04 which is no longer maintained. The payment system I'm using has recently updated its SST/TLS certificates and now require openssl > 1.0.0
.
I've downloaded the latest version and built it from scratch using the following commands:
CFLAGS=-fPIC ./config shared
CFLAGS='$CFLAGS -fPIC -Wl -Bsymbolic' CXXFLAGS='$CXXFLAGS -fPIC -Wl -Bsymbolic' make
make test
make install
After running make install
it has put all the files under /usr/local/ssl
. I've then added new path to /etc/environment
to make OS find new version of openssl before the system's one.
I've installed rbenv and ruby-build plugin for it to build ruby from scratch pointing to the newly compiled openssl library. However ruby won't use that specified version and use system's version instead. Running ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
reports i'm still using 0.9.8k
version. The command used for compiling ruby is as follows:
CFLAGS="$CFLAGS -fPIC" RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/ssl" rbenv install ree-1.8.7-2012.02
I've looked through compiler logs and it seems ruby-build is using the specified path for ssl.
I've also tried upgrading the operating system but that didn't help since 10.04 and 12.04 have diverged greatly and I had a lot of conflicts in config files.
So the question is how can I compile openssl and ruby so that ruby uses the specified openssl binaries and headers during its compilation?