1
votes

There are different ways for finding installed certificates in cert store and one of them is by using thumbprint:

using X509Store store = new(StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection certCollection = store.Certificates;
using X509Certificate2 cert = certCollection.Find(X509FindType.FindByThumbprint, "139FAA424C85CDCA61E0EB63895B0B3AA395471E", validOnly: true).First();

But I'm trying to find an easier way for the client to find their certificate like using the file's name or sth more reachable than thumbprint. By the way, I don't want them to specify file path and password because they should use an installed certificate hence should look for it in the cert store.

An installed cert would have no file name to speak of... what do you mean? - bartonjs
This doesn't make any sense. If it's in the store then it could have a "Friendly Name" but the name of the file it was loaded from (if indeed there was one) is irrelevant and not accessible any more. So perhaps you can get the user to assign a Friendly Name - Charlieface