initalize ssl context in a separate private method