openssl-1.0.1e compiling on Debian

8,118

What is probably happening is: Your openssl debian package is placed on /usr/bin, /usr/lib, /usr/share/man, and the compiled one is entirely inside /usr/local/{bin,share,lib}. Your shell finds the /usr/bin binaries first(from the package) and executes it.

You'll need to use the ./config --prefix=/usr while configuring your OpenSSL, but this could overwrite your binaries installed through apt and it could break you system. A better more correct way to compile is to use debian source packages.

Is there any feature that you want that is not compiled on the stable version(http://packages.debian.org/source/wheezy/openssl)?

Share:
8,118

Related videos on Youtube

sven
Author by

sven

Updated on September 18, 2022

Comments

  • sven
    sven over 1 year

    I am compiling OpenSSL-1.0.1e on Debian Lenny (armv4 architecture). I have been following the instruction on http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html to compile the source code. make and make test are successfully completed. I wonder how I should continue the compiling the file.

    Should I do make install or stick to the instruction and do

    make MANDIR=/usr/share/man MANSUFFIX=ssl install &&
    install -dv -m755 /usr/share/doc/openssl-1.0.1e  &&
    cp -vfr doc/*     /usr/share/doc/openssl-1.0.1e
    

    EDIT: I did both of the methods but I still have the old version of the openssl. do I need to copy the openssl binary and paste it to a specific directory (e.g., /usr/bin) to replace the new binary with the old one? How do I suppose to update the program?

    EDIT2: make test output: ALL TESTS SUCCESSFUL.

    make[1]: Leaving directory `/home/openssl-1.0.1e/test'
    OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
    OpenSSL 1.0.1e 11 Feb 2013
    built on: Mon Jun 10 05:08:05 UTC 2013
    platform: dist
    options:  bn(32,32) rc4(ptr,int) des(idx,cisc,2,long) idea(int) blowfish(idx) 
    compiler: cc -O
    OPENSSLDIR: "/usr/local/ssl"
    

    make install output:

    make[1]: Leaving directory `/home/openssl-1.0.1e/engines'
    making install in apps...
    make[1]: Entering directory `/home/openssl-1.0.1e/apps'
    installing openssl
    installing CA.sh
    installing CA.pl
    installing tsget
    make[1]: Leaving directory `/home/openssl-1.0.1e/apps'
    making install in test...
    make[1]: Entering directory `/home/openssl-1.0.1e/test'
    make[1]: Nothing to be done for `install'.
    make[1]: Leaving directory `/home/openssl-1.0.1e/test'
    making install in tools...
    make[1]: Entering directory `/home/openssl-1.0.1e/tools'
    make[1]: Leaving directory `/home/openssl-1.0.1e/tools'
    installing libcrypto.a
    installing libssl.a
    cp libcrypto.pc /usr/local/ssl/lib/pkgconfig
    chmod 644 /usr/local/ssl/lib/pkgconfig/libcrypto.pc
    cp libssl.pc /usr/local/ssl/lib/pkgconfig
    chmod 644 /usr/local/ssl/lib/pkgconfig/libssl.pc
    cp openssl.pc /usr/local/ssl/lib/pkgconfig
    chmod 644 /usr/local/ssl/lib/pkgconfig/openssl.pc
    
  • Ashish Saini
    Ashish Saini almost 11 years
    This could be a missing configuration file. Have you created the /etc/ssl/openssl.cnf, or there exists a /etc/ssl ? Cheers
  • sven
    sven almost 11 years
    There is only certs folder inside /etc/ssl. Inside the certs folder, there is only one certificate.. I used the same config options as written on linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html however, /usr/local/ssl/openssl.cnf exists
  • sven
    sven almost 11 years
    the openssl is located on /usr/local/ssl/bin, when I execute it, it shows that it is the correct version. however, when I run openssl on the terminal, it shows "-bash: /usr/bin/openssl: No such file or directory" (I purge removed the old openssl). what file do I need to edit so that openssl will be executed when I type it on the terminal?
  • sven
    sven almost 11 years
    How can I do it?
  • Ashish Saini
    Ashish Saini almost 11 years
    Edit the user .bash_profile(it could be /root/.bash_profile or /home/your_user/.bash_profile) and add the following line: export PATH=$PATH:/usr/local/ssl/bin