refactored the SSL certificate handling