title: How to setup the HTTPS certificate in an ASP.NET Core 2.1 application running against UBUNTU?
body: <p>I have a simple web app created with ASP.NET Core 2.1 and when debugging  keep bumping into a HTTPS certificate. </p>
  
  <p>While it works fine in Windows, it does not in Ubuntu due to the lack of the centralized certificate store.</p>
  
  <pre><code>Hosting environment: Development
  Content root path: /home/perret/Desktop/Tests/Showtime/ConsoleAppPlaygroun/WebApplicationTest
  Now listening on: https://localhost:5001
  Now listening on: http://localhost:5000
  Application started. Press Ctrl+C to shut down.
  dbug: HttpsConnectionAdapter[1]
        Failed to authenticate HTTPS connection.
  System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
     at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
     at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
     at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
     at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
     at System.Net.Security.SslStream.BeginAuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, Object asyncState)
     at System.Net.Security.SslStream.&lt;&gt;c.&lt;AuthenticateAsServerAsync&gt;b__51_0(SslServerAuthenticationOptions arg1, CancellationToken arg2, AsyncCallback callback, Object state)
     at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2](Func`5 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, Object state, TaskCreationOptions creationOptions)
     at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2](Func`5 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, Object state, TaskCreationOptions creationOptions)
     at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2](Func`5 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, Object state)
     at System.Net.Security.SslStream.AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken)
     at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionAdapter.InnerOnConnectionAsync(ConnectionAdapterContext context)
  </code></pre>
  
  <p>I read: </p>
  
  <ul>
  <li><a href="https://asp.net-hacker.rocks/2018/07/05/aspnetcore-ssl.html" rel="nofollow noreferrer">https://asp.net-hacker.rocks/2018/07/05/aspnetcore-ssl.html</a></li>
  <li><a href="https://dzone.com/articles/configuring-https-in-aspnet-core-21" rel="nofollow noreferrer">https://dzone.com/articles/configuring-https-in-aspnet-core-21</a></li>
  <li><a href="https://www.c-sharpcorner.com/article/configuring-https-in-asp-net-core-2-1/" rel="nofollow noreferrer">https://www.c-sharpcorner.com/article/configuring-https-in-asp-net-core-2-1/</a></li>
  <li><a href="https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-2.1&amp;tabs=visual-studio" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-2.1&amp;tabs=visual-studio</a></li>
  </ul>
  
  <p>Still I don't see any guideline / tutorial to properly setup the certificate with Ubuntu when debugging.</p>