Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

SSL Connection falls with EOFException

Quote from the previous forum:


LtSolo

Posts: 7
Registered: Jun, 2008

SSL Connection falls with EOFException
Posted: Jul 31, 2008 7:42 AM
 
Hello,

I'm having problems with SLL connection. What I tried is very simple connection establish code:
public static void main(String[] args)
{
try {
Connection cc = javax.microedition.io.Connector.open("ssl://pbxtr a.axmor.nsk:5222;deviceside=false;EndToEndRequired ");

} catch(Exception e) {
System.out.println(e.toString());
}
}

On javax.microedition.io.Connector.open the code throws EOFException. I believe that the code should be a bit more complicated. Please advice on this.


 

Cast the connection returned to a SecureConnection and try opening your InputStream and OutputStream from there.  If you continue to have problems please provide the BlackBerry model and handhed software version you are testing on.  You can find this under Options, About on the BlackBerry.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 36
Registered: ‎08-04-2008
My Device: Curve 9000

Re: SSL Connection falls with EOFException

Hello,

 

thanks for your reply. I tried to cast return object to this type or even dont cast at all:

public static void main(String[] args) { try { /*Connection cc =*/ javax.microedition.io.Connector.open("ssl://pbxtr a.axmor.nsk:5222;deviceside=false;EndToEndRequired "); } catch(Exception e) { System.out.println(e.toString()); } }

 

But this also throws the exception. I tried this on the emulator that comes with JDE 4.3.0 with MDS running at the same time.

Andrey Zharkikh
Project Manager, Axmor Software
New Developer
Posts: 36
Registered: ‎08-04-2008
My Device: Curve 9000

Re: SSL Connection falls with EOFException

I found the cause of the problem! An SSL certificate we are using on the server is not trusted (valid and not expired, but not trusted). Surely we'll resolve this issue shortly on our testing server.

 

   Please let me know if this is possible to bypass not trusted certificates. This is not great to ask end users to have trusted certificates. On some platforms (like Windows Mobile) there are ways to allow specific or all certificates from the code. I know that in J2ME this is not possible. What about Blackberry?

Andrey Zharkikh
Project Manager, Axmor Software
Highlighted
BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: SSL Connection falls with EOFException

You can use the Certificate Sync feature of Desktop Manater to load your certificate on a BlackBerry.  The user can then trust it and your application can use it for its connection.

 

Please note that this feature is not installed by default so you'll need to perform an advanced installation and select it.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.