put ssl options into a single function