ssl socket helper