We can use the X509
store to load the store and find the certificates in local machine but how to do the same for a certificate sitting on remote server?
I know we can configure a network account to have permissions on the certificate in remote machine but how to use this network account to read certificate details?
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection results = store.Certificates.Find(X509FindType.FindBySubjectName, "CertName", false);
You can use this
X509Store
overload: https://msdn.microsoft.com/en-us/library/f07btzah(v=vs.110).aspxwhere you can specify remote server path:
\\RemoteServerName\My
in thestoreName
parameter.