code for SSL