Secure socket connection implemented, inc Self-signed certificates