After some research i went with using OpenSSL as provides everything needed for proper ssl encryption