j2me Unsigned Midlet can connect Https to 443

Forum for J2ME mobile games related topics including programming doubts, books and other resources for J2ME game development

j2me Unsigned Midlet can connect Https to 443

Postby menis » Sat Jan 17, 2009 9:11 pm

Hello everybody,

I have a test Unsigned Midlet that simply does Socket Connections(SecureConnection) to a site, like that
sc = (SecureConnection)Connector.open(sslwww.myserver.com443);
Using this from my handset, i am getting the following exception
java.lang.SecurityException Untrusted MIDlet attempted to connect to a restricted port
When i am connecting using HttpsConnection instead of SecureConnection like
httpsConn = (HttpsConnection)Connector.open( httpswww.myserver.com443path);
i have no problems. From this i have some questions.
(1)why is this happening???
(2)Can i be sure that to all handsets i am going to install my application the HttpsConnection
method is going to work in all cases???
(3)When i will try to make httpsConn = (HttpsConnection)Connector.open( httpswww.myserver.com555path);
aka ssl connection in port 555, i won't face any problems? (the server of course is configured to 555 port)
Does the handset Network layer(and kvm) will initiate the connection from the handset to server port 555 correctly
or there will be a mistake and my handset will try to connect to server's port 443 instead of 555???

Thanks in Advance

NiKolaos
menis
 
Posts: 12
Joined: Sun Nov 25, 2007 6:11 pm

Return to J2ME Games

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron