Wednesday, July 22, 2009

BlackBerry File Explorer

As part of work, we had to generate code coverage report for the application on BlackBerry. We have used Cobertura for J2ME for generating the code coverage results. However, we had to develop a quick tool to transfer the coverage result file generated on the simulator to desktop. For this purpose, we have developed the file explorer / transfer tool for BlackBerry, which works on USB connection.

We would make this tool available tool for public download soon.

Sunday, July 12, 2009

Overriding ServerCertificateValidation

I found the following code very useful, when trying to debug https calls through fiddler. During this proxying, fiddler creates its own certificates, which will be failed by the programs. In order to override the behavior, while doing debugging, the following code could be used.


//using System.Net;
//using System.Security.Cryptography.X509Certificates;
//using System.Net.Security;

ServicePointManager.ServerCertificateValidationCallback +=
delegate(object sender, X509Certificate certificate,
X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
return true;
};