changeset 1213:7fd1211a1f63

Use dropbear_log instead of some fprintf's in client code.
author Konstantin Tokarev <ktokarev@smartlabs.tv>
date Tue, 01 Dec 2015 21:56:11 +0300
parents bf626d259eb1
children 61d3f56808a4
files cli-kex.c cli-runopts.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/cli-kex.c	Tue Dec 01 21:55:34 2015 +0300
+++ b/cli-kex.c	Tue Dec 01 21:56:11 2015 +0300
@@ -190,7 +190,7 @@
 
 	fp = sign_key_fingerprint(keyblob, keybloblen);
 	if (cli_opts.always_accept_key) {
-		fprintf(stderr, "\nHost '%s' key accepted unconditionally.\n(%s fingerprint %s)\n",
+		dropbear_log(LOG_INFO, "\nHost '%s' key accepted unconditionally.\n(%s fingerprint %s)\n",
 				cli_opts.remotehost,
 				algoname,
 				fp);
@@ -290,7 +290,7 @@
 	int ret;
 
 	if (cli_opts.no_hostkey_check) {
-		fprintf(stderr, "Caution, skipping hostkey check for %s\n", cli_opts.remotehost);
+		dropbear_log(LOG_INFO, "Caution, skipping hostkey check for %s\n", cli_opts.remotehost);
 		return;
 	}
 
--- a/cli-runopts.c	Tue Dec 01 21:55:34 2015 +0300
+++ b/cli-runopts.c	Tue Dec 01 21:56:11 2015 +0300
@@ -491,7 +491,7 @@
 	keytype = DROPBEAR_SIGNKEY_ANY;
 	if ( readhostkey(filename, key, &keytype) != DROPBEAR_SUCCESS ) {
 		if (warnfail) {
-			fprintf(stderr, "Failed loading keyfile '%s'\n", filename);
+			dropbear_log(LOG_WARNING, "Failed loading keyfile '%s'\n", filename);
 		}
 		sign_key_free(key);
 	} else {