Hi,
I just tested that script and it seems to be working fine. I simply changed port number from 443 to something else and it works. E.g.
s.connect((domain, 8300))
Unfortunately, I do not have access to any Java AS with SSL at this moment.
Cheers