472,142 Members | 1,263 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

Serious trouble with https (Python 2.2.3 & 2.3.3), How to check forworking ssl?

Some people tipped me off on some possibilities to tackle my https
problem. Those have definitely gotten me further in cornering the
problem. Thank you.

But:
No matter what I do to open a webconnection with httpS I always get
something in this Area:

urllib2.URLError: <urlopen error unknown url type: https>

With both versions of Python mentioned above.

My strong suspicion is that the socket stuff (dunno exact libname right
now...) is compiled without ssl support.

What I would like to know now is following:
1) What is the default setting for the compilation of the original
Python source? _With_or _without_ ssl support?

I just downloaded the sources onto Debian Linux and did the configure,
make, make install dance. No fumbling on my side done here.

Is there anybody I could ask who could know? Appart from bugging Guido
van Rossum over this that is. :-)
2) If this can't be said for shure _how_ can I find out if my version of
Python was compiled with ssl support? Apart from trying to connect via
https that is. Like I said: I've got a seriously growing suspicion that
it _is_ unsupported ssl due to compilation.
3) Where do I change the compile options (???), switches (???) - I don't
know how excactly this stuff is called - to set such stuff as what
things are compiled into the installation and which aren't. This is a
more general Linux/make/configure/gcc/whatnot sort of question, I know,
but I would be gratefull for any help.

Thank you.

Phillip
Jul 18 '05 #1
3 2436
On Wed May 19 2004 16:12, Phillip wrote:
No matter what I do to open a webconnection with httpS I always get
something in this Area:
urllib2.URLError: <urlopen error unknown url type: https>

With both versions of Python mentioned above.

My strong suspicion is that the socket stuff (dunno exact libname right
now...) is compiled without ssl support.

What I would like to know now is following:

1) What is the default setting for the compilation of the original
Python source? _With_or _without_ ssl support?

I just downloaded the sources onto Debian Linux and did the configure,
make, make install dance. No fumbling on my side done here. 2) If this can't be said for shure _how_ can I find out if my version of
Python was compiled with ssl support? Apart from trying to connect via
https that is. Like I said: I've got a seriously growing suspicion that
it _is_ unsupported ssl due to compilation.


I'm using python 2.3 in debian (package: python version 2.3.1-3) and has
ssl support. You may try:

aweil@tenuki:~$ python
Python 2.3.1 (#2, Sep 30 2003, 00:50:40)
[GCC 3.3.2 20030908 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import socket
socket.ssl(-1)

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/socket.py", line 73, in ssl
return _realssl(sock, keyfile, certfile)
TypeError: ssl() argument 1 must be _socket.socket, not int

socket.ssl function is used to handshake ssl over a socket..
Sometimes I had problems using ssl with urllib, and proxies.
So I wrote: http://ahttplib.sf.net/ There aren't packages for
install ready, but you can download it from cvs (*) (its 4 files).
The main file, includes some usage example, in its unittest
section.

Good luck and tell me if I can help you.
david

(*) http://cvs.sourceforge.net/viewcvs.p...plib/ahttplib/
--
+ There is no dark side of the moon really. Matter of fact it's all dark.
Jul 18 '05 #2
On Wed, 19 May 2004, Phillip wrote:
My strong suspicion is that the socket stuff (dunno exact libname right
now...) is compiled without ssl support.

What I would like to know now is following:
1) What is the default setting for the compilation of the original
Python source? _With_or _without_ ssl support?
The ssl support, on both 2.2.x and 2.3.x, is built via the setup.py script
which gets run after the interpreter itself is built. If setup.py can
find the SSL headers, it will attempt to build with SSL support.
I just downloaded the sources onto Debian Linux and did the configure,
make, make install dance. No fumbling on my side done here.

Is there anybody I could ask who could know? Appart from bugging Guido
van Rossum over this that is. :-)
You didn't inspect the logs from the make process? the output from
setup.py towards the end will give clues as to whether SSL support was
included.
2) If this can't be said for shure _how_ can I find out if my version of
Python was compiled with ssl support? Apart from trying to connect via
https that is. Like I said: I've got a seriously growing suspicion that
it _is_ unsupported ssl due to compilation.
For 2.3.x, there will be a _ssl.so to go with the _socket.so.

There is no visible indication with 2.3.x.
3) Where do I change the compile options (???), switches (???) - I don't
know how excactly this stuff is called - to set such stuff as what
things are compiled into the installation and which aren't. This is a
more general Linux/make/configure/gcc/whatnot sort of question, I know,
but I would be gratefull for any help.


Build options for SSL support are in setup.py.

Linux distros tend to "localise" anything and everything, so its not
possible that setup.py is not finding the SSL headers because they're
not where non-Debian people expect them to be. Added to the fact that
Linux distros also seem to go overboard in separating "developer" bits
(like header files) from "application bits". If you need the headers, you
need to install the apropriate developer packages.

I would have expected the Debian package of Python to have SSL support
though, unless its an optional package...

--
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullseye.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.org.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia

Jul 18 '05 #3
Andrew MacIntyre <an*****@bullseye.apana.org.au> writes:
On Wed, 19 May 2004, Phillip wrote:

[...]
I just downloaded the sources onto Debian Linux and did the configure,
make, make install dance.

[...]

Me too (on Debian woody).

Install libssl0.9.6 (or a newer version, maybe) AND libssl-dev, and
recompile. Or install a debian binary package of Python 2.3.
John
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Gary Feldman | last post: by
16 posts views Thread by Paul Sweeney | last post: by
22 posts views Thread by Bloke | last post: by
3 posts views Thread by zn | last post: by
1 post views Thread by Jim Bancroft | last post: by
3 posts views Thread by bowman.joseph | last post: by
2 posts views Thread by SkyRanger | last post: by
9 posts views Thread by Dr. Locke Z2A | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.