title: .Net core HttpClientFactory how to dynamically add certificates
body: <p>When registering with <code>HttpclientFactory</code>,  can only do certificate injection in <code>startUp</code>. Is there any way to do dynamic injection?</p>
  
  <pre><code>services.AddHttpClient().ConfigurePrimaryHttpMessageHandler(() =&gt; {
      var certificate = new X509Certificate2("", "", X509KeyStorageFlags.MachineKeySet);
      var handler = new HttpClientHandler();
      handler.ClientCertificates.Add(certificate);
      return handler;
  });
  </code></pre>