Problems with X509Store Certificates.Find FindByThumbprint

后端 未结 14 2127
醉话见心
醉话见心 2020-12-04 20:56

I\'m having a problem when I use the method X509Store.Certificates.Find

public static X509Certificate2 FromStore(StoreName storeName, 
                  


        
14条回答
  •  爱一瞬间的悲伤
    2020-12-04 21:10

    Replace the code to find your certificate in the store as below:

    var results = store.Certificates.Find(findType, findValue, true); 
    

    Also the 3rd param which is bool return certificates only if the certificate is valid. So make sure that your certificate is valid. If you have a self signed certificate or so then just pass the 3rd param to be "false"

提交回复
热议问题