Add exception handle and change SSLv2 to SSLv23