Q:

How to do https communication by using boost::asio::ssl on Mac OS 10.12

I am trying to call a REST API via HTTPS by using boost::asio::ssl in my Xcode Project. I couldn't find a way to link against OpenSSL in Xcode. Possibly I am not compiling OpenSSL properly. Can you give me hints on:

How to install and link against OpenSSL (version?) in Xcode (8.3.2) on Mac OS X (10.12.3)?
How to add library in my Xcode project means in source tree (openssl lib or path?) and its header search path?

A:

How install openssl library on Mac OS 10.12 and link in Xcdoe 8.3.2 for boost https connection ...steps are
1.Download openssl-1.0.2k from curl --remote-name https://www.openssl.org/source/openssl-1.0.2k.tar.gz into /usr/local/src folder ,please create src if not there.
2.Extract the archive and move into the folder.
tar -xzvf penssl-1.0.2k.tar.gz
cd penssl-1.0.2k
3.On terminal go sudo ./Configure darwin64-x86_64-cc
4.sudo make
5.sudo make test
6.sudo make install
7.export PATH="/usr/local/ssl/bin:$PATH"
8./usr/local/ssl/bin/openssl version
You will get OpenSSL 1.0.2k  26 Jan 2017
Now add /usr/local/ssl/lib in your xcode project setting Library Search Path and /usr/local/ssl/include in Header search path .
And finally add libssl.a and libcrypto.a in to xcode project from /usr/local/ssl/lib folder. Thats it.
Thanks & Regards
Qamar

