05-14-2010 04:23 PM
I would like to know how I can extract the private key that is used by the simulator/MDS when I send TLS data (HTTPS, specifically) from my app to a web site.
Reason: if I have the private key for HTTPS traffic, I can feed it to wireshark and debug problems more easily. The specific reason I am pursuing this is that my app needs secure transmission. When I test using live phones or the simulator, it works perfectly with HTTP. But when I test using HTTPS, the simulator regularly (but "randomly") fails - often with "TLSv1 Alert (Level: Fatal, Description: Bad Record MAC" but sometimes just by closing the connection. The real phone also fails, but not quite as often or with the same variety of buffer sizes.
I have found /Program Files/Research In Motion/BlackBerry JDE 4.6.0/MDS/webserver/webserver.keystore and it is my guess that is where the private key lives. If it is not, though, where is the key? And in either case, how do I get to it?
For wireshark's needs I must have a ".pem" version of the private key. I have access to the web server's private key, so I can see half of the SSL Stream. I need the BlackBerry key in order to see the other half and to try to determine why HTTPS is not robust.
If there is a HowTo for creating my own private key that the simulator will use that would be an acceptable alternative.