Initial work on SSL/Security support
Fix passing of ssl options
Reconcile with master