Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
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