I've been running M2Crypto successfully using Python 2.4 on Windows 2000,
and now I'm trying to get it to work on Python 2.3.4 on Linux.

   Attempting to initialize a context results in

Traceback (most recent call last):
   File "/www/htdocs/sitetruth.com/cgi/ratingdetails.cgi", line 46, in ?
     DetailsPageBuilder.detailspage(kdbfile,ktemplatefile,url)  # check and 
display domain or URL as web page
   File "./sitetruth/DetailsPageBuilder.py", line 70, in detailspage
     sitecert = InfoSSL2.Certificate(siteinfo, kverifylocations, verbose)
   File "./sitetruth/InfoSSL2.py", line 147, in __init__
     self.ctx = createsslcontext(trustedcafile, verbose)        # Generate 
general SSL 
context
   File "./sitetruth/InfoSSL2.py", line 40, in createsslcontext
     ctx = SSL.Context('sslv3')                                                 
# Create context with SSL params
   File "/home/sitetruth/lib/python/M2Crypto/SSL/Context.py", line 43, in 
__init__
     map()[long(self.ctx)] = self
ValueError: invalid literal for long(): _480e1008_p_SSL_CTX

    which, when I look at the code and try some test cases, seems
legitimate.  The cacheing code is trying to convert a reference to an
object (a C object, in fact) into a "long".  Python 2.4 on Windows
will do that.  Python 2.3.4 on Linux converts it to a string first,
gets "_480e1008_p_SSL_CTX", and then tries to convert that to an
integer, which fails.

    M2Crypto is supposed to work with Python 2.3, so this should work.

                                John Nagle
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to