]> granicus.if.org Git - curl/commitdiff
sasl-ir: Added --sasl-ir option to curl command line tool
authorSteve Holme <steve_holme@hotmail.com>
Sat, 27 Apr 2013 08:54:14 +0000 (09:54 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 27 Apr 2013 09:03:10 +0000 (10:03 +0100)
src/tool_cfgable.h
src/tool_getparam.c
src/tool_help.c
src/tool_operate.c

index 1f6f948521ea5448b04b2408b37ac097e1933c12..e6611fca07fc0b77e3addae34837515b003e81d8 100644 (file)
@@ -80,6 +80,7 @@ struct Configurable {
   char *mail_from;
   struct curl_slist *mail_rcpt;
   char *mail_auth;
+  bool sasl_ir;             /* Enable/disable SASL initial response */
   bool proxytunnel;
   bool ftp_append;          /* APPE on ftp */
   bool mute;                /* don't show messages, --silent given */
index 297b986f5c47cb630d85e3d8620798b0e41ddd2a..b44b9c02021fa8915bd7cb0aab60136a983c3a1b 100644 (file)
@@ -173,6 +173,7 @@ static const struct LongShort aliases[]= {
   {"$H", "mail-auth",                TRUE},
   {"$I", "post303",                  FALSE},
   {"$J", "metalink",                 FALSE},
+  {"$K", "sasl-ir",                  FALSE},
   {"0",  "http1.0",                  FALSE},
   {"1",  "tlsv1",                    FALSE},
   {"2",  "sslv2",                    FALSE},
@@ -858,6 +859,9 @@ ParameterError getparameter(char *flag,    /* f or -long-flag */
 #endif
           break;
         }
+      case 'K': /* --sasl-ir */
+        config->sasl_ir = TRUE;
+        break;
       }
       break;
     case '#': /* --progress-bar */
index e81360269033d955ce7033ddcef26351ec9bbe90..64534acf81c591209d67985bc68228a599e40bdb 100644 (file)
@@ -173,6 +173,7 @@ static const char *const helptext[] = {
   "     --retry-delay SECONDS "
   "When retrying, wait this many seconds between each",
   "     --retry-max-time SECONDS  Retry only within this period",
+  "     --sasl-ir       Enable initial response in SASL authentication"
   " -S, --show-error    "
   "Show error. With -s, make curl show errors when they occur",
   " -s, --silent        Silent mode. Don't output anything",
index 3151f416f145c341ae15ebab097218bcbf4d3482..19d0799e1b4aebcd251d2008ed5f637847f17f1f 100644 (file)
@@ -1320,6 +1320,10 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
         if(config->mail_auth)
           my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth);
 
+        /* new in 7.30.1 */
+        if(config->sasl_ir)
+          my_setopt(curl, CURLOPT_SASL_IR, (long)TRUE);
+
         /* initialize retry vars for loop below */
         retry_sleep_default = (config->retry_delay) ?
           config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */