Saturday, April 12, 2014

Build openSSL from source (Ubuntu 12.04)

Ubuntu backports patches so running the following should be enough: (The version number will not change but the build date will). Make sure to restart the machine and regenerate keys when finished.

- sudo apt-get update
- sudo apt-get dist-upgrade

[sources]
https://wiki.ubuntu.com/Security/Upgrades
http://www.ubuntu.com/usn/usn-2165-1/


Build from source:

- openssl version -a

// remove existing openssl (skip this step if it doesn't exist)
- sudo apt-get remove --purge openssl

// get latest openssl (currently: 1.0.1g) - https://www.openssl.org/source/
- cd /tmp
- wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
- tar -xvzf openssl-1.0.1g.tar.gz
- cd openssl-1.0.1g

// build - http://wiki.openssl.org/index.php/Compilation_and_Installation)
- ./config --prefix=/usr/lib/ssl --openssldir=/usr/lib/ssl
- sudo make
- sudo make test
- sudo make install

// restart machine
- sudo shutdown -r now

// check install
- openssl version -a

// should fail, update path to install directory
- export PATH=/usr/lib/ssl/bin:$PATH
- openssl version -a

No comments:

Post a Comment