I had added a post, how to install openssl 1.0.2d version, this post is can do install OpenSSL 1.0.2j version. Both are same as installation steps.

Step 1 : Check Version:

To check OpenSSL current version on your system,

# openssl version

OpenSSL 1.0.2d 9 Jul 2015


Step 2 : Download latest version and Install :

$ sudo wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz

$ sudo tar -zxf /tmp/openssl.tgz -C /tmp

$ sudo cd /tmp/openssl-*

$ sudo ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic

$ sudo  make

$ sudo make install


Step 3 : Check Latest Version:

To check OpenSSL current version on your system,
 
# openssl version
OpenSSL 1.0.2j  26 Sep 2016