为对象查找值传入字符串变量的x509store.Certificates.Find不提供匹配,但硬编码的字符串值提供匹配

我有一个问题,当我使用传递给Certificate.Find方法的字符串变量调试以下代码时,我没有得到匹配:

string thumbprint = "1243583953004";
X509Store store = new X509Store(storeName, storeLocation);
X509Certificate2Collection certColl;
store.Open(OpenFlags.ReadOnly);
store = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false);

但是,当我放置一个断点并使用硬编码的字符串值运行该方法时,我得到了一个匹配:

store = store.Certificates.Find(X509FindType.FindByThumbprint, "1243583953004", false);

我是不是漏掉了什么?find方法的第二个参数是对象类型。

转载请注明出处:http://www.tianshuzhineng.com/article/20230526/1608183.html