return ssl connection if needed