]> andersk Git - moira.git/commitdiff
support encrypted transfers
authormar <mar>
Tue, 22 Sep 1992 13:43:51 +0000 (13:43 +0000)
committermar <mar>
Tue, 22 Sep 1992 13:43:51 +0000 (13:43 +0000)
update/update_test.c

index 978dafb1452196aed2286b9736ad84f0eb35fd1f..866c8e8720789a26544f5dd004df039e716e1f31 100644 (file)
@@ -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");
This page took 0.036514 seconds and 5 git commands to generate.