try to improve ssl management
another round of ssl fixes