The X509Certificate/X509Certificate2 constructors are obsolete starting with .NET 9, [see this note](https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0057).