title: Cant find self signed trusted certificate used by Kestrel
body: <p>I have a very basic self-hosted .NET core 2.1 application with the following configuration:</p>
  
  <pre><code>public class Program
  {
      public static void Main(string[] args)
      {
          var host = new WebHostBuilder()
               .UseKestrel()
               .UseContentRoot(Directory.GetCurrentDirectory())
               .UseStartup&lt;Startup&gt;()
               .Build();
  
          host.Run();
      }
  }
  </code></pre>
  
  <p>and very typical simple controller as follows:</p>
  
  <pre><code>   [Route("api/[controller]")]
      [ApiController]
      public class ValuesController : ControllerBase
      {
          // GET api/values
          [HttpGet]
          public ActionResult&lt;IEnumerable&lt;string&gt;&gt; Get()
          {
              return new string[] { "value1", "value2" };
          }
  
          // GET api/values/5
          [HttpGet("{id}")]
          public ActionResult&lt;string&gt; Get(int id)
          {
              return "value";
          }
  
          // POST api/values
          [HttpPost]
          public void Post([FromBody] string value)
          {
          }
  
          // PUT api/values/5
          [HttpPut("{id}")]
          public void Put(int id, [FromBody] string value)
          {
          }
  
          // DELETE api/values/5
          [HttpDelete("{id}")]
          public void Delete(int id)
          {
          }
      }
  </code></pre>
  
  <p>This application works pretty fine when I test it and navigate to my HTTPS local endpoint port (44325 in my case):</p>
  
  <p><a href="https://localhost:44325/api/values" rel="noreferrer">https://localhost:44325/api/values</a></p>
  
  <p><a href="https://i.stack.imgur.com/wt2qK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wt2qK.png" alt="enter image description here"></a></p>
  
  <p>All good so far. Now I want to figure out where the certificate for this HTTPS connection is coming from since I am not using IIS Express and indeed the certificate doesn't belong to IIS Express:
  <a href="https://i.stack.imgur.com/Djkal.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Djkal.png" alt="enter image description here"></a></p>
  
  <p>I cant find above certificate in my certificate store when I search for its thumbprint. How does this certificate gets generated? Where can I find it? why does this certificate work in Edge and chrome but in Firefox its not trusted? is it generated on the fly?</p>
  
  <p>My launch setting is as follows:</p>
  
  <pre><code>{
    "$schema": "http://json.schemastore.org/launchsettings.json",
    "iisSettings": {
      "windowsAuthentication": false, 
      "anonymousAuthentication": true, 
      "iisExpress": {
        "applicationUrl": "http://localhost:55894",
        "sslPort": 44325
      }
    },
    "profiles": {
      "IIS Express": {
        "commandName": "IISExpress",
        "launchBrowser": true,
        "launchUrl": "api/values",
        "environmentVariables": {
          "ASPNETCORE_ENVIRONMENT": "Development"
        }
      },
      "Experimental1": {
        "commandName": "Project",
        "launchBrowser": true,
        "launchUrl": "api/values",
        "applicationUrl": "https://localhost:44325;http://localhost:55894",
        "environmentVariables": {
          "ASPNETCORE_ENVIRONMENT": "Development"
        }
      }
    }
  }
  </code></pre>
  
  <p><em>I am using the Experimental1 profile not the IIS Express and I see my little console when I run the application.</em></p>