OpenSSL
Before starting: Make sure you have the necessary folders and permissions — get more information.
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library.
Get the Code
Switch to
/usr/local/src
and download the source package.cd /usr/local/src
curl --remote-name http://www.openssl.org/source/openssl-1.0.2d.tar.gz
Extract the archive and move into the folder.
tar -xzvf openssl-1.0.2d.tar.gz
cd openssl-1.0.2d
Compile and Install
Configure, compile and install into
/usr/local/openssl-1.0.2d
../configure darwin64-x86_64-cc --prefix=/usr/local/openssl-1.0.2d
make
make install
Create a symbolic link that points
/usr/local/openssl
to /usr/local/openssl-1.0.2d
.ln -s openssl-1.0.2d /usr/local/openssl
Shell
Execute the following lines to update your Bash startup script.
echo 'export PATH=/usr/local/openssl/bin:$PATH' >> ~/.bash_profile
echo 'export MANPATH=/usr/local/openssl/ssl/man:$MANPATH' >> ~/.bash_profile
Load the new shell configurations.
source ~/.bash_profile
Certificates
Execute the following lines to install the certificates.
security find-certificate -a -p /Library/Keychains/System.keychain > /usr/local/openssl/ssl/cert.pem
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> /usr/local/openssl/ssl/cert.pem
Verify the Installation
Verify that you have successfully installed OpenSSL.
openssl version -a