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
Developer Community or GitHub 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.
The current wrapping of KeyStore.Load wraps a null stream argument into an empty stream.
But passing null is how you're supposed to init an empty keystore. http://developer.android.com/reference/java/security/KeyStore.html#load(java.io.InputStream, char)
When you pass null, the KeyStore tries to load it and gets an IO exception. Instead, it should create an empty store.
I tried it with master, with Galaxy Note (runs 2.3) and Intel ICS emulator (API Level 15), and could not reproduce this issue. It could be already fixed after the version you tried.
I confirmed this reproduces in 4.2.5 (Mac/MD) as you reported. So... I take it as it got fixed in 4.4.
For reference, this is what I tested (replaced button.Click event content):
var ks = KeyStore.GetInstance (KeyStore.DefaultType);
ks.Load (null, "ABCDEFG".ToCharArray ());
For reference, fixed in f3e317a5.