title: Dynamically making indy use TLSv1.2
body: <p>GitHub has stopped supporting TLS v1.0 and v1.1 (<a href="https://githubengineering.com/crypto-deprecation-notice/" rel="noreferrer">https://githubengineering.com/crypto-deprecation-notice/</a>), so my code no longer wants to download from it. I have checked and it seems I need to make Indy use TLS v1.2, as stated here: <a href="https://stackoverflow.com/questions/37809971/">Using Indy 10 IdHTTP with TLS 1.2</a>.</p>
  
  <p>I have already updated the OpenSSL DLLs to the latest from <a href="http://indy.fulgan.com/SSL/" rel="noreferrer">http://indy.fulgan.com/SSL/</a>, and Indy seems to load them fine, but I still get an error.</p>
  
  <p>The error I get:</p>
  
  <p><a href="https://i.stack.imgur.com/PxugC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PxugC.png" alt="screenshot"></a></p>
  
  <p>How can I make Indy use TLS v1.2 if I dynamically create Indy objects in a worker thread?</p>
  
  <p>Current Code:</p>
  
  <pre><code>constructor TDownload.Create(CreateSuspended: Boolean; aurl, afilename: string);
  begin
    inherited Create(CreateSuspended);
    httpclient := TIdHTTP.Create(nil);
    httpclient.Request.UserAgent := 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36';
    httpclient.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(httpclient);
    httpclient.HandleRedirects := True;
    httpclient.OnWorkBegin := idhttp1WorkBegin;
    httpclient.OnWork := idhttp1Work;
    url := aurl;
    filename := afilename;
  end;
  </code></pre>