Open borrrden opened 4 years ago
@borrrden Can you provide any kind of exception details you may be getting?
As far as I can tell there are none. I set up an exception breakpoint to log every exception thrown and I don't see any that I didn't already know about. The test I have involves manages both keys and certificates, but stripping it down to just the cert part that is failing the way I noticed this is that my code does the following when it wants to add a new "identity" as well call it:
It's also not a simple matter of running one test, it has to be the entire suite of 30 tests and about half the time it will fail like this on one of them. Most of these tests are generating certificates dynamically for tests use, so the likelihood that one test is accidentally deleting another test's certificate is low. Furthermore, I decided to monitor the certificate directory before and immediately after the call to store.Add
and I noticed no change, despite the code in X509Store indicating that it should be writing to that directory immediately. Is there any kind of debug tracing I can enable to see what is going on a bit better?
Steps to Reproduce
Apologies for these steps, there are no consistent reproduction steps
X509Store
instances pointing to the same location (for my purposes,My
) and do some adding, removing, and fetchingCurrent Behavior
Once in a while,
store.Add
andstore.AddRange
simply do nothing silently. I can examine the filesystem and see that the certificates are in fact not persisted. Catching this error condition and calling theAdd
function again results in the same behavior thereafter for the certificate in question.Expected Behavior
The certificate should be added successfully. The workaround I am doing right now is catching this error condition, and using the copy and pasted source code from mono perform the same set of operations to save the certificate to the expected location, but this is flimsy because getting the path of the store is not possible.
On which platforms did you notice this
[ X] Xamarin iOS
Version Used:
165f4b0 (via xamarin-ios/d16-6/29c4ea731)