Bläddra i källkod

/passphrase command-line switch was not documented (should have been in f3518083)

Source commit: 943224a8c70e37c683fe30803a9754c8fcc85240
Martin Prikryl 6 år sedan
förälder
incheckning
957b0d58ca
3 ändrade filer med 7 tillägg och 2 borttagningar
  1. 1 0
      source/resource/TextsWin.h
  2. 1 0
      source/resource/TextsWin1.rc
  3. 5 2
      source/windows/ConsoleRunner.cpp

+ 1 - 0
source/resource/TextsWin.h

@@ -290,6 +290,7 @@
 #define USAGE_INFO              1581
 #define USAGE_RAWTRANSFERSETTINGS 1582
 #define CUSTOM_COMMAND_PATTERNS_HINT6 1583
+#define USAGE_PASSPHRASE        1584
 
 #define WIN_FORMS_STRINGS       1600
 #define COPY_FILE               1605

+ 1 - 0
source/resource/TextsWin1.rc

@@ -295,6 +295,7 @@ BEGIN
         USAGE_INFO, "Prints list of supported ciphers and algorithms."
         USAGE_RAWTRANSFERSETTINGS, "Configures any transfer settings using a raw format as in an INI file."
         CUSTOM_COMMAND_PATTERNS_HINT6, "!E expands to serialized connection data of current session"
+        USAGE_PASSPHRASE, "A passphrase for an encrypted private key or a client certificate"
 
         WIN_FORMS_STRINGS, "WIN_FORMS_STRINGS"
         COPY_FILE, "%s file '%s' to %s:"

+ 5 - 2
source/windows/ConsoleRunner.cpp

@@ -2167,8 +2167,10 @@ void __fastcall Usage(TConsole * Console)
     PrintUsageSyntax(Console, FORMAT(L"[mysession] /%s [local_dir] [remote_dir] [/%s]", (LowerCase(SYNCHRONIZE_SWITCH), LowerCase(DEFAULTS_SWITCH))));
     PrintUsageSyntax(Console, FORMAT(L"[mysession] /%s [local_dir] [remote_dir] [/%s]", (LowerCase(KEEP_UP_TO_DATE_SWITCH), LowerCase(DEFAULTS_SWITCH))));
     PrintUsageSyntax(Console, FORMAT(L"[mysession] /%s [path]", (LowerCase(REFRESH_SWITCH))));
-    PrintUsageSyntax(Console, L"[mysession] [/privatekey=<file>] [/hostkey=<fingerprint>]");
-    PrintUsageSyntax(Console, L"[mysession] [/clientcert=<file>] [/certificate=<fingerprint>]");
+    PrintUsageSyntax(Console, FORMAT(L"[mysession] [/privatekey=<file> [/%s=<passphrase>]]", (PassphraseOption)));
+    PrintUsageSyntax(Console, L"[mysession] [/hostkey=<fingerprint>]");
+    PrintUsageSyntax(Console, FORMAT(L"[mysession] [/clientcert=<file> [/%s=<passphrase>]]", (PassphraseOption)));
+    PrintUsageSyntax(Console, L"[mysession] [/certificate=<fingerprint>]");
     PrintUsageSyntax(Console, L"[mysession] [/passive[=on|off]] [/implicit|explicit]");
     PrintUsageSyntax(Console, L"[mysession] [/timeout=<sec>]");
     PrintUsageSyntax(Console, L"[mysession] [/rawsettings setting1=value1 setting2=value2 ...]");
@@ -2210,6 +2212,7 @@ void __fastcall Usage(TConsole * Console)
     RegisterSwitch(SwitchesUsage, L"/hostkey=", USAGE_HOSTKEY);
     RegisterSwitch(SwitchesUsage, L"/clientcert=", USAGE_CLIENTCERT);
     RegisterSwitch(SwitchesUsage, L"/certificate=", USAGE_CERTIFICATE);
+    RegisterSwitch(SwitchesUsage, TProgramParams::FormatSwitch(PassphraseOption) + L"=", USAGE_PASSPHRASE);
     RegisterSwitch(SwitchesUsage, L"/passive=", USAGE_PASSIVE);
     RegisterSwitch(SwitchesUsage, L"/implicit", USAGE_IMPLICIT);
     RegisterSwitch(SwitchesUsage, L"/explicit", USAGE_EXPLICIT);