Re: Python and SSL

2007-10-05 Thread [EMAIL PROTECTED]
On Oct 5, 2:50 am, John Nagle <[EMAIL PROTECTED]> wrote: > Johny wrote: > > Martin and John, > > Thank you both for your replies > > Must I have OpenSSL imported in my Python program? > > So far I have been using only SSL support. > > Built-in SSL support works OK if I connect from my Python pro

Re: Python and SSL

2007-10-04 Thread Johny
On Oct 5, 3:50 am, John Nagle <[EMAIL PROTECTED]> wrote: > Johny wrote: > > Martin and John, > > Thank you both for your replies > > Must I have OpenSSL imported in my Python program? > > So far I have been using only SSL support. > > Built-in SSL support works OK if I connect from my Python pro

Re: Python and SSL

2007-10-04 Thread John Nagle
Johny wrote: > Martin and John, > Thank you both for your replies > Must I have OpenSSL imported in my Python program? > So far I have been using only SSL support. > Built-in SSL support works OK if I connect from my Python program > directly to SSL server ( but not via proxy). > L. SSL is

Re: Python and SSL

2007-10-04 Thread Johny
Martin and John, Thank you both for your replies Must I have OpenSSL imported in my Python program? So far I have been using only SSL support. Built-in SSL support works OK if I connect from my Python program directly to SSL server ( but not via proxy). L. -- http://mail.python.org/mailman/lis

Re: Python and SSL

2007-10-03 Thread John J. Lee
Johny <[EMAIL PROTECTED]> writes: > On Oct 3, 2:17 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> > It looks like this >> >> > MyPythonProgram --->Proxy>Server You want MyPythonProgram being to be proxied by Proxy, using the HTTP CONNECT method? (CONNECT is a way of asking the proxy to j

Re: Python and SSL

2007-10-03 Thread Martin v. Löwis
> After I added certification, that the proxy uses, among those > Trusted Root Certification Authorities list,as > Gabriel described on Windows, > > I receive > sslerror: (1, 'error:140770FC:SSL > routines:SSL23_GET_SERVER_HELLO:unknown protocol') > > > What does it mean? Technically, it means

Re: Python and SSL

2007-10-03 Thread Johny
On Oct 3, 2:17 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > It looks like this > > > MyPythonProgram --->Proxy>Server > > The proxy is written in Java. I want to use that proxy to see what my > > Python program sends to server. > > The proxy uses its own certificate and this certificat

Re: Python and SSL

2007-10-03 Thread Martin v. Löwis
> It looks like this > > MyPythonProgram --->Proxy>Server > The proxy is written in Java. I want to use that proxy to see what my > Python program sends to server. > The proxy uses its own certificate and this certificate must be > trusted, I think, otherwise I receive an error. What error d

Re: Python and SSL

2007-10-03 Thread Gabriel Genellina
En Wed, 03 Oct 2007 04:32:04 -0300, Johny <[EMAIL PROTECTED]> escribi�: > MyPythonProgram --->Proxy>Server > The proxy is written in Java. I want to use that proxy to see what my > Python program sends to server. > The proxy uses its own certificate and this certificate must be > trusted, I t

Re: Python and SSL

2007-10-03 Thread Johny
On Oct 3, 7:51 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > a certificate that is signed by OpenSSL's own CA( certification > > authority), that is not recognized in the program's list of root CAs, > > causes an exception to be raised. > > What is "the program"? What programming language i

Re: Python and SSL

2007-10-02 Thread Martin v. Löwis
> a certificate that is signed by OpenSSL's own CA( certification > authority), that is not recognized in the program's list of root CAs, > causes an exception to be raised. What is "the program"? What programming language is it written in? What library does it use to maintain a list of root CAs,

Re: Python and SSL

2007-10-02 Thread Johny
Thank you all for your replies. I am still a newbie with SSL issues but I found out that: a certificate that is signed by OpenSSL's own CA( certification authority), that is not recognized in the program's list of root CAs, causes an exception to be raised. (That is a different behaviour from the

Re: Python and SSL

2007-10-01 Thread Martin v. Löwis
> Actually, the SSL certificate has to be in valid format, because > OpenSSL does require that. Sure. However, in the first message, the OP mentioned that he gets error 503. That tells me that the SSL connection had been established successfully, and that he was actually seeing a HTTP error

Re: Python and SSL

2007-10-01 Thread John Nagle
Martin v. Löwis wrote: >>> No, as Martin points out, Python trusts EVERY certificate, which of >>> course misses the whole point of certificates. Whatever is making >>> your program fail is something different. >> Paul, are you sure for 100%. It is hard to belive. > > Not sure how many confirmati

Re: Python and SSL

2007-10-01 Thread Martin v. Löwis
>> No, as Martin points out, Python trusts EVERY certificate, which of >> course misses the whole point of certificates. Whatever is making >> your program fail is something different. > > Paul, are you sure for 100%. It is hard to belive. Not sure how many confirmations you want, but I can add

Re: Python and SSL

2007-10-01 Thread Johny
On Oct 1, 4:31 pm, Paul Rubin wrote: > Johny <[EMAIL PROTECTED]> writes: > > By using my Python program I am attempting to trust a certificate > > signed by a certification authority that Python doesn't trust and that > > causes the error. > > No, as Martin points out, P

Re: Python and SSL

2007-10-01 Thread Paul Rubin
Johny <[EMAIL PROTECTED]> writes: > By using my Python program I am attempting to trust a certificate > signed by a certification authority that Python doesn't trust and that > causes the error. No, as Martin points out, Python trusts EVERY certificate, which of course misses the whole point of c

Re: Python and SSL

2007-10-01 Thread Johny
On Sep 28, 11:13 pm, Heikki Toivonen <[EMAIL PROTECTED]> wrote: > Johny wrote: > > I need to use Python with SSL comunication betweeen servers. > > (I use hhtplib but I think urllib2 can also be used ) > > I think I need to use SSL root certificate and tell a program to > > trust this certificate

Re: Python and SSL

2007-09-30 Thread Heikki Toivonen
John Nagle wrote: > Any progress on getting M2Crypto 0.18 to build successfully > on Fedora Core? I have had no luck getting a Fedora Core environment running. Ubuntu is my main OS, but I do have VMWare installed. I tried to install FC7 from the live CD into VMWare, but the installer dies. I a

Re: Python and SSL

2007-09-29 Thread John Nagle
Paul Rubin wrote: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: >>> But how can I tell my Python program to trust my SSL certificate? >> Why do you want to tell it that? The SSL module will trust *any* >> server certificate, no need to tell it explicitly which ones to >> trust. > > Er, the whole

Re: Python and SSL

2007-09-29 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Please try to understand that OP's question. He got some error, > and for some reason, he concluded that he needs to tell Python > to trust the server certificate (most likely to make the error > go away). I told him that he is likely wrong, and that

Re: Python and SSL

2007-09-29 Thread Martin v. Löwis
>>> But how can I tell my Python program to trust my SSL certificate? >> Why do you want to tell it that? The SSL module will trust *any* >> server certificate, no need to tell it explicitly which ones to >> trust. > > Er, the whole idea of SSL is that you don't trust the connection. Please try t

Re: Python and SSL

2007-09-28 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > > But how can I tell my Python program to trust my SSL certificate? > > Why do you want to tell it that? The SSL module will trust *any* > server certificate, no need to tell it explicitly which ones to > trust. Er, the whole idea of SSL is that you

Re: Python and SSL

2007-09-28 Thread John Nagle
Heikki Toivonen wrote: > Johny wrote: >> I need to use Python with SSL comunication betweeen servers. >> (I use hhtplib but I think urllib2 can also be used ) >> I think I need to use SSL root certificate and tell a program to >> trust this certificate. > > You can't do secure SSL with the built

Re: Python and SSL

2007-09-28 Thread Martin v. Löwis
> I heard that python 2.6 will include full "server-side SSL > support" (whatever this means). > Is it true? Yes, that's true. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-09-28 Thread Martin v. Löwis
> I need to use Python with SSL comunication betweeen servers. > (I use hhtplib but I think urllib2 can also be used ) > I think I need to use SSL root certificate and tell a program to > trust this certificate. I don't think so - what the SSL module does is already fine for you. > But how can

Re: Python and SSL

2007-09-28 Thread Giampaolo Rodolà
I heard that python 2.6 will include full "server-side SSL support" (whatever this means). Is it true? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-09-28 Thread Heikki Toivonen
Johny wrote: > I need to use Python with SSL comunication betweeen servers. > (I use hhtplib but I think urllib2 can also be used ) > I think I need to use SSL root certificate and tell a program to > trust this certificate. You can't do secure SSL with the builtin SSL support, you need to use a

Python and SSL

2007-09-27 Thread Johny
I need to use Python with SSL comunication betweeen servers. (I use hhtplib but I think urllib2 can also be used ) I think I need to use SSL root certificate and tell a program to trust this certificate. But how can I tell my Python program to trust my SSL certificate? When I tried before I rece

Re: Python and SSL

2007-04-17 Thread Steve Holden
Paul Rubin wrote: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> It means that these modules can do encrypted communication for their >> respective protocol. They cannot validate that they are really talking >> to the server they think they talk to (so they are prone to a >> man-in-the-middle a

Re: Python and SSL

2007-04-16 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > It means that these modules can do encrypted communication for their > respective protocol. They cannot validate that they are really talking > to the server they think they talk to (so they are prone to a > man-in-the-middle attack), however, as comm

Re: Python and SSL

2007-04-16 Thread Martin v. Löwis
> - I noticed that socket module provides an SSL class (socket.ssl) but > even if documentation reports that it does not do any certificate > verification a lot of stdlib modules (imaplib, poplib, smtplib, > httplib and urllib2) provides SSL extension classes wherein socket.ssl > is used. What does

Re: Python and SSL

2007-04-16 Thread kyosohma
On Apr 16, 10:24 am, "billiejoex" <[EMAIL PROTECTED]> wrote: > Hi, > I developed an ftp-server library and now I would like to add support > for SSL/TLS as described in RFC 2228:http://tools.ietf.org/html/rfc2228 > Currenlty I'm searching for documentation about this subject and I > would like to s

Python and SSL

2007-04-16 Thread billiejoex
Hi, I developed an ftp-server library and now I would like to add support for SSL/TLS as described in RFC 2228: http://tools.ietf.org/html/rfc2228 Currenlty I'm searching for documentation about this subject and I would like to start to ask some questions: - I noticed that socket module provides a

Re: Python and SSL enabled

2006-11-03 Thread matey
It appears my __m2crypto.so didn't get built correctly. cengsu01:/home/mmedina/crypt/m2kcrypto/m2crypto-0.16 >python setup.py build /usr/local/lib/python2.3/distutils/extension.py:128: UserWarning: Unknown Extension options: 'swig_opts' warnings.wa

Re: Python and SSL enabled

2006-11-01 Thread Heikki Toivonen
matey wrote: > I tried to run the following simple program > > #!/usr/local/bin/python > > import M2Crypto > > u = M2Crypto.m2urllib.URLopener() > u.open('http://www.yahoo.com') > > However I got the following errror: > > Traceback (most recent call last): > File "test.py", line 3, in ?

Re: Python and SSL enabled

2006-11-01 Thread matey
Firstly, thank for answering. Otherwise I wouldn't know where to turn for help... I tried to run the following simple program #!/usr/local/bin/python import M2Crypto u = M2Crypto.m2urllib.URLopener() u.open('http://www.yahoo.com') However I got the following errror: Traceback (most

Re: Python and SSL enabled

2006-10-31 Thread Heikki Toivonen
matey wrote: > However, when I use the following command: python setup.py install > I get the following error: > > creating /usr/local/lib/python2.3/site-packages/M2Crypto > error: could not create > '/usr/local/lib/python2.3/site-packages/M2Crypto': Permission denied Ok, it looks like you M2Cryp

Re: Python and SSL enabled

2006-10-31 Thread matey
Problem: I want to be able to access an HTTPS website read/write commands to this website. >From reading this group it appears I need M2Crypto and OpenSSL Current version of Python 2.3.4 I downloaded: M2Crypto 0.16 OpenSSL 0.9.7k SWIG 1.3.29 Compiled OpenSSL libraries are located in /home/mmed

Re: Python and SSL enabled

2006-10-25 Thread Heikki Toivonen
matey wrote: > I am have version 2.3.4. I want to write a python script to access a > secure HTTPS. > > I tried the following: > > import urllib > urllib.urlopen("https://somesecuresite.com";) > s = f.read() > f.close() I hope you know the Python stdlib SSL does not provide certificate checking

Python and SSL enabled

2006-10-24 Thread matey
I am have version 2.3.4. I want to write a python script to access a secure HTTPS. I tried the following: import urllib urllib.urlopen("https://somesecuresite.com";) s = f.read() f.close() I get the following: IOError [Errno url error] unknown url type: 'https' 1. How do I know if SSL is ena