When trying to create a new certificate from a PKCS#7 (.p7b
)-file I get the following exception: System.Security.Cryptography.CryptographicException: 'Cannot find object or property'
I get the same error if I read from file or byte array. I can create X509Certificate2
with .pem
or .p12
files this way without a problem. Why is this happening?
new X509Certificate2(path);
new X509Certificate2(byteArray);