I have a problem with adding the my certificate file to the windows mobile x509 storage.
I use the following test program:
byte[] certifictateData = FileToByteArray(appPath + "cert.cer");
X509Certificate certificate = new X509Certificate(certifictateData);
X509Store store = new X509Store(StoreName.Root, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadWrite);
int i = store.Certificates.Add(certificate);
store.Close();
On the device are 28 root certs installed. after adding my I receive 29 as value.
but when I try to open store.Certificates[28] there is an OutOfRangeException
Even after closing there is no entry in the certificate storage.
When I open the cert.cer file in the mobile browser it’s added without any message.
What can I do?
Best regards
This is what I also experienced with this namespace.
Never the less you do a great job with the Small Device Framework..
this is my quick and cheaper solution 😉
The only drawback is that a message pops up and shows the import result.