diff dropbearconvert.c @ 299:740e782679be ucc-axis-hack

Various changes to compile+kind of run on UCC's axis board. Note that fprintf(stdin -> printf( accounts for many of the changes
author Matt Johnston <matt@ucc.asn.au>
date Sat, 25 Mar 2006 12:57:09 +0000
parents c85c88500ea6
children
line wrap: on
line diff
--- a/dropbearconvert.c	Fri Dec 09 06:10:27 2005 +0000
+++ b/dropbearconvert.c	Sat Mar 25 12:57:09 2006 +0000
@@ -37,7 +37,7 @@
 
 static void printhelp(char * progname) {
 
-	fprintf(stderr, "Usage: %s <inputtype> <outputtype> <inputfile> <outputfile>\n\n"
+	printf( "Usage: %s <inputtype> <outputtype> <inputfile> <outputfile>\n\n"
 					"CAUTION: This program is for convenience only, and is not secure if used on\n"
 					"untrusted input files, ie it could allow arbitrary code execution.\n"
 					"All parameters must be specified in order.\n"
@@ -69,7 +69,7 @@
 
 	/* get the commandline options */
 	if (argc != 5) {
-		fprintf(stderr, "All arguments must be specified\n");
+		printf( "All arguments must be specified\n");
 		goto usage;
 	}
 
@@ -79,7 +79,7 @@
 	} else if (argv[1][0] == 'o') {
 		intype = KEYFILE_OPENSSH;
 	} else {
-		fprintf(stderr, "Invalid input key type\n");
+		printf( "Invalid input key type\n");
 		goto usage;
 	}
 
@@ -89,7 +89,7 @@
 	} else if (argv[2][0] == 'o') {
 		outtype = KEYFILE_OPENSSH;
 	} else {
-		fprintf(stderr, "Invalid output key type\n");
+		printf( "Invalid output key type\n");
 		goto usage;
 	}
 
@@ -116,7 +116,7 @@
 
 	key = import_read(infile, NULL, intype);
 	if (!key) {
-		fprintf(stderr, "Error reading key from '%s'\n",
+		printf( "Error reading key from '%s'\n",
 				infile);
 		goto out;
 	}
@@ -132,12 +132,12 @@
 	}
 #endif
 
-	fprintf(stderr, "Key is a %s key\n", keytype);
+	printf( "Key is a %s key\n", keytype);
 
 	if (import_write(outfile, key, NULL, outtype) != 1) {
-		fprintf(stderr, "Error writing key to '%s'\n", outfile);
+		printf( "Error writing key to '%s'\n", outfile);
 	} else {
-		fprintf(stderr, "Wrote key to '%s'\n", outfile);
+		printf( "Wrote key to '%s'\n", outfile);
 		ret = 0;
 	}