added support for ssl chains