How are people authenticated in their ASP.NET Core Web APIs on Ubuntu/Docker given the bug described below? How are people authenticated in their ASP.NET Core Web APIs on Ubuntu/Docker given the bug described below? docker docker

How are people authenticated in their ASP.NET Core Web APIs on Ubuntu/Docker given the bug described below?


The problem here is that what is being passed to the constructor are the bytes of the base64 representation of the key, and not the bytes of the key itself.

If this code works on Windows then maybe it's a good idea to create an issue in the .net core github referencing this problem.


Thanks for the answer. For those who would like to copy and paste:

var certificateWithoutHeaderAndFooter = certificateString         .Replace("\\n","")         .Replace("-----BEGIN CERTIFICATE-----", "")          .Replace("-----END CERTIFICATE-----", "");var certificateBytes = Convert.FromBase64String(certificateWithoutHeaderAndFooter);var certificate = new X509Certificate2(certificateBase64Bytes);