anchor.diff:  					(port ssh)))
   
   (defclass auth-password (auth-data)
  -	((login    :type      string
  -					   :initarg   :login
  -					   :initform  ""
  -					   :reader    login)
  -	 (password :type      string
  +	((password :type      string
   						 :initarg   :password
   						 :initform  ""
   						 :reader    password)))
  -
  -(defmethod authentication ((auth auth-password) session)
  -	(let ((result (user-auth-password session
  -																		(login    auth)
  -																		(password auth))))
  -		(cond 
  -			((eq result :ERROR-NONE)                  t)
  -			((eq result :ERROR-EAGAIN)                :ERROR-EAGAIN)
  -			((eq result :ERROR-AUTHENTICATION-FAILED) nil)
  -			(t (throw-last-error session)))))
   
   (defmethod ssh-verify-session ((ssh ssh-connection))
   	(with-known-hosts (known-hosts ((session ssh) (hosts-db ssh)))
  
positive.code: 														fs-username username-length
  														fs-password password-length
  														callback))))
  				
  (defctype +channel+ :pointer)
  (defcfun ("libssh2_channel_open_ex" --channel-open-ex) +channel+
  	(session +session+) (channel-type :string) (channel-type-length :unsigned-int)
  
negative.code: 						 (--session-auth-methods-list 
  							session fs-username (length username))))))
  
  (defctype +ssh-agent+ :pointer)
  (defcfun ("libssh2_agent_init" agent-init) +ssh-agent+
  	(session +session+))
  
  (defcfun ("libssh2_agent_free" agent-free) :void
  	(agent +ssh-agent+))
  
  (defcfun ("libssh2_agent_connect" agent-connect) +ERROR-CODE+
  	(agent +ssh-agent+))
  
  (defcfun ("libssh2_agent_disconnect" agent-disconnect) +ERROR-CODE+
  	(agent +ssh-agent+))
  
  (defcfun ("libssh2_agent_list_identities" agent-list-identies) +ERROR-CODE+
  	(agent +ssh-agent+))
  
  (defcenum +IDENTITY-AMOUNT+
  	(:MORE 0)
  	(:END  1))
  
  (defcfun ("libssh2_agent_get_identity" --agent-get-identity) +IDENTITY-AMOUNT+
  	(agent +ssh-agent+)
  	(store :pointer) (previous-public-key :pointer))
  
  (defun agent-identities-iterator (agent)
  	(when (eq (agent-list-identies agent) :ERROR-NONE)
  		(let ((agent agent)
  					(prev  (null-pointer)))
  			(lambda () 
  				(with-foreign-object (store :pointer)
  					(unless (eq (--agent-get-identity agent store prev)
  											:END)
  						(setf prev 
  									(mem-aref store :pointer 0))))))))
  
  (defmacro foreach-agent-identity ((identy agent) &body body)
  	`(let ((agent ,agent)
  				 (list-identies (agent-list-indenties ,agent))
  				 (prev (null-pointer)))
  		 (if (eq list-identies :ERROR-NONE)
  				 (with-foreign-object (store :pointer)
  					 (labels 
  							 ((process-next-identity ()
  									(unless (eq (--agent-get-identity agent store prev)
  															:END)
  										(let ((,identy (setf prev
  																				 (mem-aref store :pointer 0))))
  											,@body
  											(process-next-identity)))))
  						 (process-next-identity))))))													
  
  (defctype +known-hosts+ :pointer)
  (defcfun ("libssh2_knownhost_init" known-hosts-init) +known-hosts+
  	(session +session+))
  