Added support for two way SSL

- Added the ability to use two way SSL
- Also made use of the protocol option