Problems with X509Store Certificates.Find FindByThumbprint

后端 未结 14 2101
醉话见心
醉话见心 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:08

    I encounter this invisible Unicode char as well. Trying using Notepad (Windows 10) somehow didn't work well for me either. Finally, I use PowerShell to get the clean thumbprint hex:

    PS C:\> $tp= (Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Subject -match "mycert"}).Thumbprint;
    PS C:\> $tp
    

    SO much for Unicode char.

提交回复
热议问题