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


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) -
- cd /tmp
- wget
- tar -xvzf openssl-1.0.1g.tar.gz
- cd openssl-1.0.1g

// build -
- ./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