@@ -104,8 +104,7 @@ enum {
104104 OPT_DEBUG_TLS,
105105 OPT_API_VERSION,
106106 OPT_MEMORY,
107- OPT_USE_FUTURE_PROTOCOL_VERSION,
108- OPT_ENCRYPT
107+ OPT_USE_FUTURE_PROTOCOL_VERSION
109108};
110109
111110CSimpleOpt::SOption g_rgOptions[] = { { OPT_CONNFILE, " -C" , SO_REQ_SEP },
@@ -131,7 +130,6 @@ CSimpleOpt::SOption g_rgOptions[] = { { OPT_CONNFILE, "-C", SO_REQ_SEP },
131130 { OPT_API_VERSION, " --api-version" , SO_REQ_SEP },
132131 { OPT_MEMORY, " --memory" , SO_REQ_SEP },
133132 { OPT_USE_FUTURE_PROTOCOL_VERSION, " --use-future-protocol-version" , SO_NONE },
134- { OPT_ENCRYPT, " --encrypt" , SO_REQ_SEP },
135133 TLS_OPTION_FLAGS,
136134 SO_END_OF_OPTIONS };
137135
@@ -505,11 +503,6 @@ static void printProgramUsage(const char* name) {
505503 " --use-future-protocol-version\n "
506504 " Use the simulated future protocol version to connect to the cluster.\n "
507505 " This option can be used testing purposes only!\n "
508- " --encrypt PASSWORD\n "
509- " Encrypts the specified password and prints the encrypted password\n "
510- " with the `encrypted:' prefix. The encrypted password can be used\n "
511- " with --tls-password option. This option causes fdbcli to encrypt\n "
512- " the password and exit.\n "
513506 " -v, --version Print FoundationDB CLI version information and exit.\n "
514507 " -h, --help Display this help and exit.\n " );
515508}
@@ -906,6 +899,7 @@ void LogCommand(std::string line, UID randomID, std::string errMsg) {
906899 printf (" %s\n " , errMsg.c_str ());
907900 TraceEvent (SevInfo, " CLICommandLog" , randomID).detail (" Command" , line).detail (" Error" , errMsg);
908901}
902+
909903struct CLIOptions {
910904 std::string program_name;
911905 int exit_code = -1 ;
@@ -929,7 +923,6 @@ struct CLIOptions {
929923 std::string tlsCAPath;
930924 std::string tlsPassword;
931925 uint64_t memLimit = 8uLL << 30 ;
932- Optional<std::string> encrypt;
933926
934927 std::vector<std::pair<std::string, std::string>> knobs;
935928
@@ -1069,9 +1062,6 @@ struct CLIOptions {
10691062 knobs.emplace_back (knobName.get (), args.OptionArg ());
10701063 break ;
10711064 }
1072- case OPT_ENCRYPT:
1073- encrypt = args.OptionArg ();
1074- break ;
10751065 case OPT_DEBUG_TLS:
10761066 debugTLS = true ;
10771067 break ;
@@ -2395,16 +2385,6 @@ int main(int argc, char** argv) {
23952385 if (opt.exit_code != -1 )
23962386 return opt.exit_code ;
23972387
2398- if (opt.encrypt .present ()) {
2399- std::string encrypted;
2400- if (!TLSConfig::encodePassword (opt.encrypt .get (), encrypted)) {
2401- fprintf (stderr, " ERROR: Failed to encrypt password\n " );
2402- return 1 ;
2403- }
2404- printf (" %s\n " , encrypted.c_str ());
2405- return 0 ;
2406- }
2407-
24082388 if (opt.trace ) {
24092389 if (opt.traceDir .empty ())
24102390 setNetworkOption (FDBNetworkOptions::TRACE_ENABLE);
0 commit comments