How to quickly check if pcks7 binary blob is signed or encrypted, without external libraries
I can use SignedCms or EnvelopedCms classes to verify signatures and decrypt S/MIME data but I need to know in advance if it’s signed or encrypted. If it’s signed and I use EnvelopedCms, I get an exception. If it’s encrypted and I use SignedCms – again, exception.