Client/server snippet using SSL-protected TCP-socket connection between client and server (check certs from both sides)