Hello, all.

I would like to ask what the current status is with the SSL library in
PythonCE. It is not available with my main PythonCE package (v2.5
19/12/2006), so is there any way to add it?

I have not, until recently, had any reason to need the SSL module, but I
came across the following handy Python script, which lets you check your
inbox status programmatically:

================ Python code ================
import urllib2, getpass

def get_unread_msgs(user, passwd=getpass.getpass("pwd:")):
    auth_handler = urllib2.HTTPBasicAuthHandler()
    auth_handler.add_password(
        realm='New mail feed',
        uri='https://mail.google.com',
        user='%...@gmail.com' % user,
        passwd=passwd
    )
    opener = urllib2.build_opener(auth_handler)
    urllib2.install_opener(opener)
    feed = urllib2.urlopen('https://mail.google.com/mail/feed/atom')
    return feed.read()
================ Python code ================

I would really like to get this working with PythonCE, but need to overcome
the lacking SSL capability on PythonCE. I know the device can do it, since
PocketIE can happily log into email accounts securely.

I have so far looked into the following:

a) attempting to compile the SSL module from the main Python 2.5 source
using all the PythonCE references - not got very far with this yet.

b) compiling openSSL and either using it in step a), or somehow accessing
the parts I need directly with PythonCE and maybe ctypes. Unfortunately,
openSSL documentation for arm processors is not very clear, and rather
confusing (it seems to require various extra tools such as perl and a
package called wcecompat).

c) TLS Lite - this could be an option, but also appears to require some
other modules/libraries. Have not explored this fully yet.

d) Create my own DLL using VS2008 and the .NET CF3.5 functions. I think this
would probably involve a considerable amount of work. Again, have not got an
idea yet of exactly what would be required.

My current workaround for all this is to use the GmAtom.php class (other
mailbox types can be handled with similar scripts). Using this PHP class I
can reproduce the same function as the script above from a PHP server, and
then make the information accessible without the need for SSL to my PythonCE
device (I could probably include some additional measures to make this more
secure without the need for SSL type encryption). This workaround is not
fully satisfactory to me, because it still relies on there being an
available PHP server to do the accessing. I suppose this could possibly also
be done using a 'pocket' PHP server, assuming it has SSL capabilities (any
recommendations?), but I would be worried about the amount of resources this
would use.

Any help on any of the above would be much appreciated!

Adam
_______________________________________________
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce

Reply via email to