I am using C # .NET and you need to install a bunch of certificates in the Windows certificate store.
I need to check which of these certificates are root certificates (i.e. self-signed), so I can install them in the trusted root certificate store.
I am using the standard class X509Certificate2 . My current idea is to check if the Issuer and Subject tags are the same.
I noticed that X509Certificate2 has Issuer - IssuerName and Subject - SubjectName .
Is it better to compare Issuer with Subject or IssuerName with SubjectName ? Or does it not matter?
Also, is this a reliable method or am I better off using a different approach?
source share