diff cli-authpubkey.c @ 458:c1e9c81d1d27 agent-client

propagate from branch 'au.asn.ucc.matt.dropbear' (head 8a7db1e2fdc5636abb338adb636babc32f465739) to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head d82c25da2f7e4fb6da510d806c64344e80bb270d)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 16 Aug 2007 13:34:37 +0000
parents 7f010e3b1802 ca7e76d981d9
children 568638be7203
line wrap: on
line diff
--- a/cli-authpubkey.c	Wed Aug 08 15:57:50 2007 +0000
+++ b/cli-authpubkey.c	Thu Aug 16 13:34:37 2007 +0000
@@ -173,6 +173,13 @@
 
 	TRACE(("enter cli_auth_pubkey"))
 
+	if (cli_opts.pubkeys == NULL && 
+			cli_opts.agent_fwd &&
+			!cli_opts.agent_keys_loaded) {
+		/* get the list of available keys from the agent */
+		load_agent_keys(&cli_opts.pubkeys);
+	}
+
 	if (cli_opts.privkeys != NULL) {
 		/* Send a trial request */
 		send_msg_userauth_pubkey(cli_opts.privkeys->key,