OpenSSL usage on Linux Distros

Hi,

My server is Centos 6 i686.
Is it possible get an openssl download from this site

"https://www.openssl.org/source/"

(which is used for 64 bit platforms)
and use it on 32 bit platforms also?

Thx,
Aigini

You can build 32 bit on 64 bit source, like this, for example:

 gcc -m32 my64bitsource.c -o my32bitout

So, take a look at the -m32 flag and any additional libs you might need to link in.

So, yes, it is certainly possible, to answer your question (building the source).

Thanks for the suggestion.
But I am not sure how to get the "my64bitsource.c" file in the command.

Because if we install the source rpm like this :

# rpm -i openssl-0.9.8e-12.el5_4.6.src.rpm

then we will get a file like this in rpmbuild/SOURCES :

openssl.spec

And the command to patch, configure and compile is like this :

# rpmbuild -ba openssl.spec

So how does the my64bitsource.c come into the picture, and how do we use the above commands in this case.

Check your manual for rpmbuild, specifically the --target PLATFORM option. As Neo pointed out you will need some 32 bit libraries installed on your 64 bit OS to be available to do this cross compiling.

Hi,

Thanks for all the suggestions, however, my OS is not 64 bit. It is 32 bit.
But I am not sure if the installer (source) for OpenSSL from this site "/source/index.html" is 64 bit or 32 bit as it does not clearly mention anything about the OpenSSL packages available there.

So the reason that I post the question in this forum is because I think that the OpenSSL package that I download from the link above is 64 bit, and I need to use (compile/install) it on a 32 bit system.

You can compile 64 bit source code on 32 bit architecture.

For example, with gcc:

gcc -m32 my64bitcode.c -o my32bitcodeout

You may need to install gcc-multlib by using the following commands (ubuntu examples):

For C :

sudo apt-get install gcc-multilib

For C++:

sudo apt-get install g++-multilib

You can easily Google this situation and find many solutions.