added timeout for ssl handshake to SecureAgent