4

I need to install 2 different versions of OpenSSL simultaneously. I am currently using Amazon EC2 with the Amazon 32-bit AMI, which currently runs OpenSSL 1.0.0a. I have an old piece of software that I need to run that requires OpenSSL.0.9.6. Unfortunately, from what I have learned, OpenSSL is not backwards-compatible so I will need to install both versions simultaneously. I have found an RPM that will work, however, I have no idea how to go about installing them simultaneously without breaking anything. Any information on this subject would be greatly appreciated.

Thanks

4

You may download source from openssl.org archive and compile it from source, installing into separate directory.

./config --prefix=/old-openssl-version-x.x.x --openssldir=/old-openssl-version-x.x.x
make
make test
sudo make install

Then use specific version like this:

/old-openssl-version-x.x.x/bin/openssl do whatever you want
| improve this answer | |
  • Is it possible to get the gcc to include the headers from the newly compiled version instead of the one installed on the system, if yes how? 🙈 – Chagai Friedlander Aug 14 at 13:54
1

My guess is that you're running a distribution that doesn't have sane policies about naming library packages relative to the soname of the object(s) contained within it, and which also has conniptions about installing multiple versions of the same package.

In this case, your only option is to unpack the package by hand (I believe rpm2cpio is the starting point on that particular crusade, unless there's an rpm option that does the trick) and place the relevant files in the correct location(s). If you're only after libssl and (as a result) libcrypto, this should be fairly straightforward -- you copy libssl.so.0.9.6 and libcrypto.so.0.9.6 into place, and ldd on the problematic binary should show happiness.

If you do need the whole OpenSSL suite of a particular version, you need to publically name and shame the vendor, for the good of the Internet, because that's just ridiculous.

| improve this answer | |
  • I had tried this, and although it appeased ldd it still caused the application to crash. – OldSpiceArcticForce Aug 27 '11 at 3:40
  • 1
    Then something else is going on. Time to diagnose the crash. I assume you've completely appeased ldd? – womble Aug 27 '11 at 3:42
  • +1 for correctly referring to ldd as a god. – polynomial Aug 27 '11 at 3:46
  • Yes, it is completely appeased. The application runs fine until it receives a new connection at which point it crashes without leaving any error messages. I have it running correctly on an old CentOS version that has the correct OpenSSL version installed naturally. This is why I narrowed the error down to OpenSSL. – OldSpiceArcticForce Aug 27 '11 at 3:47
  • Because the only thing different between CentOS 5 and CentOS 6 is the OpenSSL version... seriously, something's broken, but to say it's definitely OpenSSL is incredibly naive and counterproductive. At this point in time, you either need to get the vendor involved (which is likely to result in "we don't support CentOS 6, go away"), or fire up gdb and start taking stack traces. – womble Aug 27 '11 at 3:54
1

One option would be to simply setup a chroot on your system with the distro that has the set of packages you need. This will take up more storage, and will mean that you have to do maintenance on both the root OS, and the chroot, but it would allow you to run one app in the chroot that requires an older set of libraries on the same system that you run applications that require up-to-date libraries.

| improve this answer | |
0

I've done this on a BSD box without any issues. Just make sure to only install the libraries and not overwrite the actual 'openssl' binary (manpages too).

It would probably be safer to just rpm2cpio and extract the libraries.

| improve this answer | |
  • I tried placing the 2 required libraries libssl.so.0.9.6 and libcrypto.so.0.9.6 in the directory and it got past the error but it still caused the application crash. If I install all the libraries from the RPM would it still work correctly with the newer binary? – OldSpiceArcticForce Aug 27 '11 at 3:35
  • You should get more details about the crash, can you run it inside of strace and see what is causing the crash? Incorrect system call? – polynomial Aug 27 '11 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.