473,386 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2577
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gary Feldman | last post by:
I think I've found a deficiency in the design of urllib related to https. In order to complete an https connection, it appears that URLOpener and hence FancyURLOpener require the key and cert...
16
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at...
22
by: Bloke | last post by:
Hi all. Some time ago (years) I had a script on Python 2.2 that would retieve a HTTPS web site. I used python22-win32-ssl.zip to handle the SSL aspect and it worked wonderfully. I am...
3
by: zn | last post by:
This is a beginner question. I need to create a page that is encrypted by SSL. The web server is already serving SSL encrypted web pages with "https" before the link. Do I need to do anything other...
1
by: Jim Bancroft | last post by:
Hi everyone, I'm running into a problem with my ASP.Net application. I've just created a new aspx page which uses some new components of mine that inherit from ServicedComponent and are...
3
by: bowman.joseph | last post by:
Hi, I'm new to python. I've been handed the job of modifying a script we have here at work that pulls content from a zope site, to create static html. They wanted a check to make sure the...
2
by: SkyRanger | last post by:
I create class: FOClassName:= PyString_FromString(ClasName); FClass:= PyClass_New(nil, FDict, FOClassName); PyDict_SetItemString(FDict, ClasName, FClass); Py_DECREF(FOClassName);...
9
by: Dr. Locke Z2A | last post by:
So I'm writing a bot in python that will be able to do all kinds of weird shit. One of those weird shit is the ability to translate text from one language to another, which I figured I'd use google...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.