https.cc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. //-*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: http.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $
  4. /* ######################################################################
  5. HTTPS Acquire Method - This is the HTTPS acquire method for APT.
  6. It uses libcurl
  7. ##################################################################### */
  8. /*}}}*/
  9. // Include Files /*{{{*/
  10. #include <config.h>
  11. #include <apt-pkg/fileutl.h>
  12. #include <apt-pkg/error.h>
  13. #include <apt-pkg/hashes.h>
  14. #include <apt-pkg/netrc.h>
  15. #include <apt-pkg/configuration.h>
  16. #include <apt-pkg/macros.h>
  17. #include <apt-pkg/strutl.h>
  18. #include <apt-pkg/proxy.h>
  19. #include <sys/stat.h>
  20. #include <sys/time.h>
  21. #include <unistd.h>
  22. #include <stdio.h>
  23. #include <ctype.h>
  24. #include <stdlib.h>
  25. #include <array>
  26. #include <iostream>
  27. #include <sstream>
  28. #include "https.h"
  29. #include <apti18n.h>
  30. /*}}}*/
  31. using namespace std;
  32. struct APT_HIDDEN CURLUserPointer {
  33. HttpsMethod * const https;
  34. HttpsMethod::FetchResult * const Res;
  35. HttpsMethod::FetchItem const * const Itm;
  36. CURLUserPointer(HttpsMethod * const https, HttpsMethod::FetchResult * const Res,
  37. HttpsMethod::FetchItem const * const Itm) : https(https), Res(Res), Itm(Itm) {}
  38. };
  39. size_t
  40. HttpsMethod::parse_header(void *buffer, size_t size, size_t nmemb, void *userp)
  41. {
  42. size_t len = size * nmemb;
  43. CURLUserPointer *me = static_cast<CURLUserPointer *>(userp);
  44. std::string line((char*) buffer, len);
  45. for (--len; len > 0; --len)
  46. if (isspace_ascii(line[len]) == 0)
  47. {
  48. ++len;
  49. break;
  50. }
  51. line.erase(len);
  52. if (line.empty() == true)
  53. {
  54. me->https->Server->JunkSize = 0;
  55. if (me->https->Server->Result != 416 && me->https->Server->StartPos != 0)
  56. ;
  57. else if (me->https->Server->Result == 416)
  58. {
  59. bool partialHit = false;
  60. if (me->Itm->ExpectedHashes.usable() == true)
  61. {
  62. Hashes resultHashes(me->Itm->ExpectedHashes);
  63. FileFd file(me->Itm->DestFile, FileFd::ReadOnly);
  64. me->https->Server->TotalFileSize = file.FileSize();
  65. me->https->Server->Date = file.ModificationTime();
  66. resultHashes.AddFD(file);
  67. HashStringList const hashList = resultHashes.GetHashStringList();
  68. partialHit = (me->Itm->ExpectedHashes == hashList);
  69. }
  70. else if (me->https->Server->Result == 416 && me->https->Server->TotalFileSize == me->https->File->FileSize())
  71. partialHit = true;
  72. if (partialHit == true)
  73. {
  74. me->https->Server->Result = 200;
  75. me->https->Server->StartPos = me->https->Server->TotalFileSize;
  76. // the actual size is not important for https as curl will deal with it
  77. // by itself and e.g. doesn't bother us with transport-encoding…
  78. me->https->Server->JunkSize = std::numeric_limits<unsigned long long>::max();
  79. }
  80. else
  81. me->https->Server->StartPos = 0;
  82. }
  83. else
  84. me->https->Server->StartPos = 0;
  85. me->Res->LastModified = me->https->Server->Date;
  86. me->Res->Size = me->https->Server->TotalFileSize;
  87. me->Res->ResumePoint = me->https->Server->StartPos;
  88. // we expect valid data, so tell our caller we get the file now
  89. if (me->https->Server->Result >= 200 && me->https->Server->Result < 300)
  90. {
  91. if (me->Res->Size != 0 && me->Res->Size > me->Res->ResumePoint)
  92. me->https->URIStart(*me->Res);
  93. if (me->https->Server->AddPartialFileToHashes(*(me->https->File)) == false)
  94. return 0;
  95. }
  96. else
  97. me->https->Server->JunkSize = std::numeric_limits<decltype(me->https->Server->JunkSize)>::max();
  98. }
  99. else if (me->https->Server->HeaderLine(line) == false)
  100. return 0;
  101. return size*nmemb;
  102. }
  103. size_t
  104. HttpsMethod::write_data(void *buffer, size_t size, size_t nmemb, void *userp)
  105. {
  106. HttpsMethod *me = static_cast<HttpsMethod *>(userp);
  107. size_t buffer_size = size * nmemb;
  108. // we don't need to count the junk here, just drop anything we get as
  109. // we don't always know how long it would be, e.g. in chunked encoding.
  110. if (me->Server->JunkSize != 0)
  111. return buffer_size;
  112. if(me->File->Write(buffer, buffer_size) != true)
  113. return 0;
  114. if(me->Queue->MaximumSize > 0)
  115. {
  116. unsigned long long const TotalWritten = me->File->Tell();
  117. if (TotalWritten > me->Queue->MaximumSize)
  118. {
  119. me->SetFailReason("MaximumSizeExceeded");
  120. _error->Error("Writing more data than expected (%llu > %llu)",
  121. TotalWritten, me->Queue->MaximumSize);
  122. return 0;
  123. }
  124. }
  125. if (me->Server->GetHashes()->Add((unsigned char const * const)buffer, buffer_size) == false)
  126. return 0;
  127. return buffer_size;
  128. }
  129. // HttpsServerState::HttpsServerState - Constructor /*{{{*/
  130. HttpsServerState::HttpsServerState(URI Srv,HttpsMethod * Owner) : ServerState(Srv, Owner), Hash(NULL)
  131. {
  132. TimeOut = Owner->ConfigFindI("Timeout", TimeOut);
  133. Reset();
  134. }
  135. /*}}}*/
  136. bool HttpsServerState::InitHashes(HashStringList const &ExpectedHashes) /*{{{*/
  137. {
  138. delete Hash;
  139. Hash = new Hashes(ExpectedHashes);
  140. return true;
  141. }
  142. /*}}}*/
  143. APT_PURE Hashes * HttpsServerState::GetHashes() /*{{{*/
  144. {
  145. return Hash;
  146. }
  147. /*}}}*/
  148. bool HttpsMethod::SetupProxy() /*{{{*/
  149. {
  150. URI ServerName = Queue->Uri;
  151. // Determine the proxy setting
  152. AutoDetectProxy(ServerName);
  153. // Curl should never read proxy settings from the environment, as
  154. // we determine which proxy to use. Do this for consistency among
  155. // methods and prevent an environment variable overriding a
  156. // no-proxy ("DIRECT") setting in apt.conf.
  157. curl_easy_setopt(curl, CURLOPT_PROXY, "");
  158. // Determine the proxy setting - try https first, fallback to http and use env at last
  159. string UseProxy = ConfigFind("Proxy::" + ServerName.Host, "");
  160. if (UseProxy.empty() == true)
  161. UseProxy = ConfigFind("Proxy", "");
  162. // User wants to use NO proxy, so nothing to setup
  163. if (UseProxy == "DIRECT")
  164. return true;
  165. // Parse no_proxy, a comma (,) separated list of domains we don't want to use
  166. // a proxy for so we stop right here if it is in the list
  167. if (getenv("no_proxy") != 0 && CheckDomainList(ServerName.Host,getenv("no_proxy")) == true)
  168. return true;
  169. if (UseProxy.empty() == true)
  170. {
  171. const char* result = nullptr;
  172. if (std::find(methodNames.begin(), methodNames.end(), "https") != methodNames.end())
  173. result = getenv("https_proxy");
  174. // FIXME: Fall back to http_proxy is to remain compatible with
  175. // existing setups and behaviour of apt.conf. This should be
  176. // deprecated in the future (including apt.conf). Most other
  177. // programs do not fall back to http proxy settings and neither
  178. // should Apt.
  179. if (result == nullptr && std::find(methodNames.begin(), methodNames.end(), "http") != methodNames.end())
  180. result = getenv("http_proxy");
  181. UseProxy = result == nullptr ? "" : result;
  182. }
  183. // Determine what host and port to use based on the proxy settings
  184. if (UseProxy.empty() == false)
  185. {
  186. Proxy = UseProxy;
  187. if (Proxy.Access == "socks5h")
  188. curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
  189. else if (Proxy.Access == "socks5")
  190. curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
  191. else if (Proxy.Access == "socks4a")
  192. curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A);
  193. else if (Proxy.Access == "socks")
  194. curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
  195. else if (Proxy.Access == "http" || Proxy.Access == "https")
  196. curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
  197. else
  198. return false;
  199. if (Proxy.Port != 1)
  200. curl_easy_setopt(curl, CURLOPT_PROXYPORT, Proxy.Port);
  201. curl_easy_setopt(curl, CURLOPT_PROXY, Proxy.Host.c_str());
  202. if (Proxy.User.empty() == false || Proxy.Password.empty() == false)
  203. {
  204. curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, Proxy.User.c_str());
  205. curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, Proxy.Password.c_str());
  206. }
  207. }
  208. return true;
  209. } /*}}}*/
  210. // HttpsMethod::Fetch - Fetch an item /*{{{*/
  211. // ---------------------------------------------------------------------
  212. /* This adds an item to the pipeline. We keep the pipeline at a fixed
  213. depth. */
  214. bool HttpsMethod::Fetch(FetchItem *Itm)
  215. {
  216. struct stat SBuf;
  217. struct curl_slist *headers=NULL;
  218. char curl_errorstr[CURL_ERROR_SIZE];
  219. URI Uri = Itm->Uri;
  220. setPostfixForMethodNames(Uri.Host.c_str());
  221. AllowRedirect = ConfigFindB("AllowRedirect", true);
  222. Debug = DebugEnabled();
  223. // TODO:
  224. // - http::Pipeline-Depth
  225. // - error checking/reporting
  226. // - more debug options? (CURLOPT_DEBUGFUNCTION?)
  227. {
  228. auto const plus = Binary.find('+');
  229. if (plus != std::string::npos)
  230. Uri.Access = Binary.substr(plus + 1);
  231. }
  232. curl_easy_reset(curl);
  233. if (SetupProxy() == false)
  234. return _error->Error("Unsupported proxy configured: %s", URI::SiteOnly(Proxy).c_str());
  235. maybe_add_auth (Uri, _config->FindFile("Dir::Etc::netrc"));
  236. FetchResult Res;
  237. CURLUserPointer userp(this, &Res, Itm);
  238. // callbacks
  239. curl_easy_setopt(curl, CURLOPT_URL, static_cast<string>(Uri).c_str());
  240. curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, parse_header);
  241. curl_easy_setopt(curl, CURLOPT_WRITEHEADER, &userp);
  242. curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
  243. curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
  244. // options
  245. curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true);
  246. curl_easy_setopt(curl, CURLOPT_FILETIME, true);
  247. curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 0);
  248. if (std::find(methodNames.begin(), methodNames.end(), "https") != methodNames.end())
  249. {
  250. curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
  251. curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS);
  252. // File containing the list of trusted CA.
  253. std::string const cainfo = ConfigFind("CaInfo", "");
  254. if(cainfo.empty() == false)
  255. curl_easy_setopt(curl, CURLOPT_CAINFO, cainfo.c_str());
  256. // Check server certificate against previous CA list ...
  257. curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, ConfigFindB("Verify-Peer", true) ? 1 : 0);
  258. // ... and hostname against cert CN or subjectAltName
  259. curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, ConfigFindB("Verify-Host", true) ? 2 : 0);
  260. // Also enforce issuer of server certificate using its cert
  261. std::string const issuercert = ConfigFind("IssuerCert", "");
  262. if(issuercert.empty() == false)
  263. curl_easy_setopt(curl, CURLOPT_ISSUERCERT, issuercert.c_str());
  264. // For client authentication, certificate file ...
  265. std::string const pem = ConfigFind("SslCert", "");
  266. if(pem.empty() == false)
  267. curl_easy_setopt(curl, CURLOPT_SSLCERT, pem.c_str());
  268. // ... and associated key.
  269. std::string const key = ConfigFind("SslKey", "");
  270. if(key.empty() == false)
  271. curl_easy_setopt(curl, CURLOPT_SSLKEY, key.c_str());
  272. // Allow forcing SSL version to SSLv3 or TLSv1
  273. long final_version = CURL_SSLVERSION_DEFAULT;
  274. std::string const sslversion = ConfigFind("SslForceVersion", "");
  275. if(sslversion == "TLSv1")
  276. final_version = CURL_SSLVERSION_TLSv1;
  277. else if(sslversion == "TLSv1.0")
  278. final_version = CURL_SSLVERSION_TLSv1_0;
  279. else if(sslversion == "TLSv1.1")
  280. final_version = CURL_SSLVERSION_TLSv1_1;
  281. else if(sslversion == "TLSv1.2")
  282. final_version = CURL_SSLVERSION_TLSv1_2;
  283. else if(sslversion == "SSLv3")
  284. final_version = CURL_SSLVERSION_SSLv3;
  285. curl_easy_setopt(curl, CURLOPT_SSLVERSION, final_version);
  286. // CRL file
  287. std::string const crlfile = ConfigFind("CrlFile", "");
  288. if(crlfile.empty() == false)
  289. curl_easy_setopt(curl, CURLOPT_CRLFILE, crlfile.c_str());
  290. }
  291. else
  292. {
  293. curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP);
  294. curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP);
  295. }
  296. // cache-control
  297. if(ConfigFindB("No-Cache", false) == false)
  298. {
  299. // cache enabled
  300. if (ConfigFindB("No-Store", false) == true)
  301. headers = curl_slist_append(headers,"Cache-Control: no-store");
  302. std::string ss;
  303. strprintf(ss, "Cache-Control: max-age=%u", ConfigFindI("Max-Age", 0));
  304. headers = curl_slist_append(headers, ss.c_str());
  305. } else {
  306. // cache disabled by user
  307. headers = curl_slist_append(headers, "Cache-Control: no-cache");
  308. headers = curl_slist_append(headers, "Pragma: no-cache");
  309. }
  310. curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  311. // speed limit
  312. int const dlLimit = ConfigFindI("Dl-Limit", 0) * 1024;
  313. if (dlLimit > 0)
  314. curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, dlLimit);
  315. // set header
  316. curl_easy_setopt(curl, CURLOPT_USERAGENT, ConfigFind("User-Agent", "Debian APT-CURL/1.0 (" PACKAGE_VERSION ")").c_str());
  317. // set timeout
  318. int const timeout = ConfigFindI("Timeout", 120);
  319. curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout);
  320. //set really low lowspeed timeout (see #497983)
  321. curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, DL_MIN_SPEED);
  322. curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout);
  323. // debug
  324. if (Debug == true)
  325. curl_easy_setopt(curl, CURLOPT_VERBOSE, true);
  326. // error handling
  327. curl_errorstr[0] = '\0';
  328. curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errorstr);
  329. // If we ask for uncompressed files servers might respond with content-
  330. // negotiation which lets us end up with compressed files we do not support,
  331. // see 657029, 657560 and co, so if we have no extension on the request
  332. // ask for text only. As a sidenote: If there is nothing to negotate servers
  333. // seem to be nice and ignore it.
  334. if (ConfigFindB("SendAccept", true))
  335. {
  336. size_t const filepos = Itm->Uri.find_last_of('/');
  337. string const file = Itm->Uri.substr(filepos + 1);
  338. if (flExtension(file) == file)
  339. headers = curl_slist_append(headers, "Accept: text/*");
  340. }
  341. // if we have the file send an if-range query with a range header
  342. if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0)
  343. {
  344. std::string Buf;
  345. strprintf(Buf, "Range: bytes=%lli-", (long long) SBuf.st_size);
  346. headers = curl_slist_append(headers, Buf.c_str());
  347. strprintf(Buf, "If-Range: %s", TimeRFC1123(SBuf.st_mtime, false).c_str());
  348. headers = curl_slist_append(headers, Buf.c_str());
  349. }
  350. else if(Itm->LastModified > 0)
  351. {
  352. curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
  353. curl_easy_setopt(curl, CURLOPT_TIMEVALUE, Itm->LastModified);
  354. }
  355. // go for it - if the file exists, append on it
  356. File = new FileFd(Itm->DestFile, FileFd::WriteAny);
  357. Server = CreateServerState(Itm->Uri);
  358. if (Server->InitHashes(Itm->ExpectedHashes) == false)
  359. return false;
  360. // keep apt updated
  361. Res.Filename = Itm->DestFile;
  362. // get it!
  363. CURLcode success = curl_easy_perform(curl);
  364. // If the server returns 200 OK but the If-Modified-Since condition is not
  365. // met, CURLINFO_CONDITION_UNMET will be set to 1
  366. long curl_condition_unmet = 0;
  367. curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &curl_condition_unmet);
  368. if (curl_condition_unmet == 1)
  369. Server->Result = 304;
  370. File->Close();
  371. curl_slist_free_all(headers);
  372. // cleanup
  373. if (success != CURLE_OK)
  374. {
  375. #pragma GCC diagnostic push
  376. #pragma GCC diagnostic ignored "-Wswitch"
  377. switch (success)
  378. {
  379. case CURLE_COULDNT_RESOLVE_PROXY:
  380. case CURLE_COULDNT_RESOLVE_HOST:
  381. SetFailReason("ResolveFailure");
  382. break;
  383. case CURLE_COULDNT_CONNECT:
  384. SetFailReason("ConnectionRefused");
  385. break;
  386. case CURLE_OPERATION_TIMEDOUT:
  387. SetFailReason("Timeout");
  388. break;
  389. }
  390. #pragma GCC diagnostic pop
  391. // only take curls technical errors if we haven't our own
  392. // (e.g. for the maximum size limit we have and curls can be confusing)
  393. if (_error->PendingError() == false)
  394. _error->Error("%s", curl_errorstr);
  395. else
  396. _error->Warning("curl: %s", curl_errorstr);
  397. return false;
  398. }
  399. switch (DealWithHeaders(Res))
  400. {
  401. case ServerMethod::IMS_HIT:
  402. URIDone(Res);
  403. break;
  404. case ServerMethod::ERROR_WITH_CONTENT_PAGE:
  405. // unlink, no need keep 401/404 page content in partial/
  406. RemoveFile(Binary.c_str(), File->Name());
  407. case ServerMethod::ERROR_UNRECOVERABLE:
  408. case ServerMethod::ERROR_NOT_FROM_SERVER:
  409. return false;
  410. case ServerMethod::TRY_AGAIN_OR_REDIRECT:
  411. Redirect(NextURI);
  412. break;
  413. case ServerMethod::FILE_IS_OPEN:
  414. struct stat resultStat;
  415. if (unlikely(stat(File->Name().c_str(), &resultStat) != 0))
  416. {
  417. _error->Errno("stat", "Unable to access file %s", File->Name().c_str());
  418. return false;
  419. }
  420. Res.Size = resultStat.st_size;
  421. // Timestamp
  422. curl_easy_getinfo(curl, CURLINFO_FILETIME, &Res.LastModified);
  423. if (Res.LastModified != -1)
  424. {
  425. struct timeval times[2];
  426. times[0].tv_sec = Res.LastModified;
  427. times[1].tv_sec = Res.LastModified;
  428. times[0].tv_usec = times[1].tv_usec = 0;
  429. utimes(File->Name().c_str(), times);
  430. }
  431. else
  432. Res.LastModified = resultStat.st_mtime;
  433. // take hashes
  434. Res.TakeHashes(*(Server->GetHashes()));
  435. // keep apt updated
  436. URIDone(Res);
  437. break;
  438. }
  439. delete File;
  440. return true;
  441. }
  442. /*}}}*/
  443. std::unique_ptr<ServerState> HttpsMethod::CreateServerState(URI const &uri)/*{{{*/
  444. {
  445. return std::unique_ptr<ServerState>(new HttpsServerState(uri, this));
  446. }
  447. /*}}}*/
  448. HttpsMethod::HttpsMethod(std::string &&pProg) : ServerMethod(std::move(pProg),"1.2",Pipeline | SendConfig)/*{{{*/
  449. {
  450. auto addName = std::inserter(methodNames, methodNames.begin());
  451. addName = "http";
  452. auto const plus = Binary.find('+');
  453. if (plus != std::string::npos)
  454. {
  455. addName = Binary.substr(plus + 1);
  456. auto base = Binary.substr(0, plus);
  457. if (base != "https")
  458. addName = base;
  459. }
  460. if (std::find(methodNames.begin(), methodNames.end(), "https") != methodNames.end())
  461. curl_global_init(CURL_GLOBAL_SSL);
  462. else
  463. curl_global_init(CURL_GLOBAL_NOTHING);
  464. curl = curl_easy_init();
  465. }
  466. /*}}}*/
  467. HttpsMethod::~HttpsMethod() /*{{{*/
  468. {
  469. curl_easy_cleanup(curl);
  470. }
  471. /*}}}*/
  472. int main(int, const char *argv[]) /*{{{*/
  473. {
  474. std::string Binary = flNotDir(argv[0]);
  475. if (Binary.find('+') == std::string::npos && Binary != "https")
  476. Binary.append("+https");
  477. return HttpsMethod(std::move(Binary)).Run();
  478. }
  479. /*}}}*/