我正在尝试实例化一个X509Certificate
对象,但我一直遇到相同CryptographicException
的错误消息:
“找不到原始签名者”。
我尝试了几种加载证书的方法:
// some different things that I have tried
var cert = X509Certificate.CreateFromCertFile(certFileName);
var cert2 = new X509Certificate(byteArray);
var cert3 = new X509Certificate(byteArray, secretString);
var cert4 = X509Certificate.CreateFromSignedFile(certFileName);
我尝试过从文件和字节数组加载。每次我得到同样的错误。这可能是什么原因造成的?