From: mar Date: Tue, 22 Sep 1992 13:43:51 +0000 (+0000) Subject: support encrypted transfers X-Git-Tag: release77~403 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/ca63c94e350359e37fb7ea5db611dd1c1d35966c support encrypted transfers --- diff --git a/update/update_test.c b/update/update_test.c index 978dafb1..866c8e87 100644 --- a/update/update_test.c +++ b/update/update_test.c @@ -5,6 +5,7 @@ * Reads commands from the command line: * test host [commands...] * -s file file sends file to host + * -S file file sends encrypted file to host * -i file sends instruction file to host * -x file executes instructions * -n nop @@ -63,7 +64,14 @@ char **argv; file = argv[++i]; rfile = argv[++i]; fprintf(stderr, "Sending file %s to %s as %s\n", file, host, rfile); - send_file(file, rfile); + send_file(file, rfile, 0); + break; + case 'S': + if (i+2 >= argc) usage(); + file = argv[++i]; + rfile = argv[++i]; + fprintf(stderr, "Sending (encrypted) file %s to %s as %s\n", file, host, rfile); + send_file(file, rfile, 1); break; case 'i': if (i+1 >= argc) usage(); @@ -72,7 +80,7 @@ char **argv; mktemp(buf); fprintf(stderr, "Sending instructions %s to %s as %s\n", file, host, buf); - send_file(file, buf); + send_file(file, buf, 0); break; case 'I': if (i+2 >= argc) usage(); @@ -81,7 +89,7 @@ char **argv; strcpy(buf, rfile); fprintf(stderr, "Sending instructions %s to %s as %s\n", file, host, buf); - send_file(file, buf); + send_file(file, buf, 0); break; case 'x': fprintf(stderr, "Executing instructions %s on %s\n", buf, host); @@ -111,6 +119,7 @@ usage() fprintf(stderr, "Usage: test host [commands...]\n"); fprintf(stderr, " Commands are:\n"); fprintf(stderr, "\t-s srcfile dstfile\tsends file\n"); + fprintf(stderr, "\t-S srcfile dstfile\tsends encrypted file\n"); fprintf(stderr, "\t-i srcfile\t\tsends instructions\n"); fprintf(stderr, "\t-I srcfile dstfile\tsends instructions\n"); fprintf(stderr, "\t-x\t\texecutes last instructions\n");