You Are Here:

Community: Developer Discussion Boards

#1 Old Trouble with HTTPS - 2005-01-24, 14:08

Join Date: Jan 2005
Posts: 4
jranki
Offline
Registered User
Hi all,

I've been unable to get https connections working.

Here's what i've tried (from bt_console):
>>> import urllib
>>> urllib.urlretrieve("https://host/path","C:\\filename")
and the interpreter on the phone exits

>>> import httplib
>>> conn = httplib.HTTPSConnection("host")
>>> conn.request("GET","/path")
>>> resp = conn.getresponse()
and the interpreter on the phone hangs

Non-https equivalents of the above do work.

Has anyone gotten https to work? How?

Thanks.
Reply With Quote

#2 Old 2005-01-24, 14:48

Join Date: Jan 2005
Posts: 4
jranki
Offline
Registered User
I tried with socket too:
>>> import socket
>>> s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
>>> s.connect(("host",443))
>>> ssls = socket.ssl(s)
>>> ssls.write("GET / HTTP/1.0\r\n\r\n")
18
>>> data = ssls.read(1024)
and the interpreter on the phone exits
Reply With Quote

#3 Old 2005-01-24, 18:15

Join Date: Jul 2004
Posts: 76
eriksmartt
Offline
Regular Contributor
Which model phone are you trying this on? I'm pretty sure the SSL stuff only works on SDK 2.x and newer devices (ie., when the OS started shipping with SSL libraries.)
Reply With Quote

#4 Old 2005-01-24, 21:02

Join Date: Jan 2005
Posts: 4
jranki
Offline
Registered User
It's 6630. Software version 2.39.129.

Https conncetions do work with the phones browser.
Reply With Quote

#5 Old 2005-01-31, 03:24

Join Date: Jan 2005
Posts: 11
eichin
Offline
Registered User
I also see it on a 6630 (HK firmware, from expansys - is there an easy way to ask it for the version? it wasn't in settings-about...) urllib can open and .read random http pages, but https://www.amazon.com (for example) causes the interpreter app to exit.

Note that I'm trying this over the bt_console connection - I haven't tried it locally, but I hope that doesn't make a difference, since I expect to be doing *all* of my development that way (at least until I find a bt keyboard driver :-)

Is there any app failure logging on the phone?
Reply With Quote

#6 Old 2005-02-01, 05:01

Join Date: Jan 2005
Posts: 11
eichin
Offline
Registered User
Looks like it happens at the lowest layer, if that wasn't already obvious:

Code:
>>> from e32socket import *
>>> es = socket(AF_INET, SOCK_STREAM)
>>> es.connect(("147.243.138.170", 443))
>>> ses = ssl(es)
  *crash*
Reply With Quote

#7 Old 2005-02-13, 08:29

Join Date: Jan 2005
Posts: 4
jranki
Offline
Registered User
I think some of the problems stem from SSL Objects read() behaviour. On 6630 read(n) blocks if n bytes are not available from the connection. read() (without n parameter supplied) crashes the interpreter. So, if you're careful not to try to read more than is available from the connection, you can read from ssl connection.

But for example httplib.SSLFile.read() and readline() assume non-blocking behaviour from SSL object.

Does this have something to do with no support for non-blocking sockets?
Reply With Quote

#8 Old 2005-07-04, 13:45

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Seems like there is a genuine bug in our SSL support.

Sorry on behalf of the whole team for ignoring this for this long -- almost six months without a proper response to a reported interpreter crash is simply not acceptable.

We'll see what we can do to fix both this bug and our internal process for responding to bug reports so that this kind of oversight will not happen again.
Reply With Quote

#9 Old 2005-07-05, 12:13

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Just for reference: the tracking number for this bug is #207.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia