Created attachment 21223 [details]
p7b file sample
// p7b_path denotes p7b filename
X509Certificate2Collection certCollection = new X509Certificate2Collection();
This code results in CryptographicException (Unable to decode certificate), no matter which p7b file is tried.
p7b files are created by Windows wizard (open a .cer file and export certificate chain). The originating .cer file is loaded just fine:
// cer_path denotes cer filename
x509Cer = new X509Certificate2(cer_path);
Trying this .p7b and .cer thing in Android Emulator (installed with Xamarin for Visual Studio). The product is up-to-date.
The same p7b file and the same code runs just fine in .NET Core 1.0 on Windows. Running on the legacy .NET Framework 2.0 is fine either. The certificate gets extracted successfully.
Tried this with several p7b files, no difference.
It works fine for me with Mono 5.4