I just (in June 2016) ran the following instructions to update Openssl (in /usr/local/openssl) on my Mac, but when I check the version, it's showing that I'm using a version built in 2015 (the System/Library/OpenSSL version).
Question: what can I do to get my Mac (running El Capitain) to use the latest version I installed?
The commands I ran to use the latest version:
cd /usr/local/src
curl --remote-name https://www.openssl.org/source/openssl-1.0.2h.tar.gz
Extract the archive and move into the folder.
tar -xzvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
Compile and Install
Configure, compile and install into /usr/local/openssl-1.0.2h.
./configure darwin64-x86_64-cc --prefix=/usr/local/openssl-1.0.2h
make depend
make
make install
Create a symbolic link that points /usr/local/openssl to /usr/local/openssl-1.0.2h.
ln -s openssl-1.0.2h /usr/local/openssl
When I run openssl version in the terminal, it shows me this output (the important part is that it was built in July 2015 and is the System/Library/Openssl)
openssl version -a
OpenSSL 0.9.8zg 14 July 2015
built on: Jul 31 2015
platform: darwin64-x86_64-llvm
options: bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) blowfish(idx)
compiler: -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS -DZLIB -mmacosx-version-min=10.6
OPENSSLDIR: "/System/Library/OpenSSL"
/usr/localis not in your PATH variable but/usr/local/binshould be. Try-ln -s openssl-1.0.2h /usr/local/bin/openssl– fd0 Jun 09 '16 at 18:52ln -s openssl-1.0.2h /usr/local/openssl, so I should tryln -s openssl-1.0.2h /usr/local/bin/openssl? – Michael Jun 09 '16 at 18:54/usr/local/binand runopensslit gives me the old versionOpenSSL> version OpenSSL 0.9.8zg 14 July 2015....even if the version in path was the old version, if I link the new version to /usr/local/bin, would you expect it to run the new or old version if I runopensslfrom /usr/local/bin? – Michael Jun 09 '16 at 19:00hash -rand opening new terminal window (and yes I'm using bash) – Michael Jun 09 '16 at 19:26