Re: Loading a PKCS#1 public key using M2Crypto

2013-01-18 Thread Marc Aymerich
level. >> >> I'm updating my code incorporating your new contribution! >> >> Just to let you know, during my previous research I had found a >> python-Crypto related solution that also uses DER and ASN.1 [1], but it uses >> a different approach (I guess). I

Re: Loading a PKCS#1 public key using M2Crypto

2013-01-17 Thread Piet van Oostrum
> > Just to let you know, during my previous research I had found a python-Crypto > related solution that also uses DER and ASN.1 [1], but it uses a different > approach (I guess). I suspect that this approach is also possible with > M2Crypto because it has a method for

Re: Loading a PKCS#1 public key using M2Crypto

2013-01-17 Thread Marc Aymerich
how to handle these keys in a low level. I'm updating my code incorporating your new contribution! Just to let you know, during my previous research I had found a python-Crypto related solution that also uses DER and ASN.1 [1], but it uses a different approach (I guess). I suspect that this

Re: Loading a PKCS#1 public key using M2Crypto

2013-01-17 Thread Piet van Oostrum
ding, but most of the parts are fixed. The only variable parts are two length fields. So I just plug these into the fixed stuff. This saves using one of the ASN.1 libraries. We do have to work in binary (DER format) instead of base64, however. from M2Crypto import BIO, RSA import base64 def der_len

Re: Loading a PKCS#1 public key using M2Crypto

2013-01-17 Thread Marc Aymerich
On Thursday, January 17, 2013 1:32:25 AM UTC+1, Piet van Oostrum wrote: > Marc Aymerich writes: > > > > > Hi, > > > I've been trying very, very hard to load an RSA key using M2Crypto but > > without any success. > > > > > > basicall

Re: Loading a PKCS#1 public key using M2Crypto

2013-01-16 Thread Piet van Oostrum
Marc Aymerich writes: > Hi, > I've been trying very, very hard to load an RSA key using M2Crypto but > without any success. > > basically this is what I'm trying to do: >>>> from M2Crypto import BIO, RSA >>>

Loading a PKCS#1 public key using M2Crypto

2013-01-16 Thread Marc Aymerich
Hi, I've been trying very, very hard to load an RSA key using M2Crypto but without any success. basically this is what I'm trying to do: >>> from M2Crypto import BIO, RSA >>> >>> pubkey = """-BEGIN RSA PUBLIC KEY- ... MIIBCgKCAQEA

m2crypto load from memory to ctx.set_tmp_dh()

2012-12-11 Thread makeit . tsxtsx
.. with dhbio = M2Crypto.BIO.MemoryBuffer(str(dh_params)) gives the same result: Traceback (most recent call last): File "bconn.py", line 121, in main() File "bconn.py", line 88, in main ctx.set_tmp_dh(dhbio) File "/usr/local/lib/python2.6/dist-packages/M2Crypto/

pyOpenSSL -> m2crypto conversion?

2012-09-23 Thread Matej Cepl
for more details). Now I would like to unify external crypto libraries just to m2crypto (a) I think using two crypto libraries is suspicious, b) I would like to eliminate use python-crypto to minimize general number of crypto libraries), for which I would like to first of all port pyOpenSSL

Re: M2crypto

2012-02-13 Thread zigi
Ok, thanks. On 13 Lut, 23:27, geremy condra wrote: > On Mon, Feb 13, 2012 at 12:37 AM, zigi wrote: > > Hello, > > this is must be testing time to crypt files, using just M2crypto :-) > > I know this is a strange use of the library, but such is the will of > > the ma

Re: M2crypto

2012-02-13 Thread geremy condra
On Mon, Feb 13, 2012 at 12:37 AM, zigi wrote: > Hello, > this is must be testing time to crypt files, using just M2crypto :-) > I know this is a strange use of the library, but such is the will of > the management. I take it you mean that you're benchmarking file encryption

Re: M2crypto

2012-02-13 Thread zigi
Hello, this is must be testing time to crypt files, using just M2crypto :-) I know this is a strange use of the library, but such is the will of the management. On 13 Lut, 01:28, geremy condra wrote: > On Sun, Feb 12, 2012 at 4:00 PM, Mel Wilson wrote: > > zigi wrote: >

Re: M2crypto

2012-02-12 Thread geremy condra
On Sun, Feb 12, 2012 at 4:00 PM, Mel Wilson wrote: > zigi wrote: > >> Hello, >> M2crypto >> >> __init__(self, alg, key, iv, op, key_as_bytes=0, d='md5', >> salt='12345678', i=1, padding=1) >> >> I wont write app, using M2crypt

Re: M2crypto

2012-02-12 Thread Mel Wilson
zigi wrote: > Hello, > M2crypto > > __init__(self, alg, key, iv, op, key_as_bytes=0, d='md5', > salt='12345678', i=1, padding=1) > > I wont write app, using M2crypto and I can not understand what are the > arguments: > key, iv, op, salt ? >

M2crypto

2012-02-12 Thread zigi
Hello, M2crypto __init__(self, alg, key, iv, op, key_as_bytes=0, d='md5', salt='12345678', i=1, padding=1) I wont write app, using M2crypto and I can not understand what are the arguments: key, iv, op, salt ? What they do ? -- http://mail.python.org/mailman/listinfo/python-list

m2crypto https, xmlrpc and ignore server name mismatch

2011-08-02 Thread Gelonida N
Hi, Just started playing with m2crypto's xmlrpc The code I'm using is: import xmlrpclib from M2Crypto.m2xmlrpclib import Server, SSL_Transport from M2Crypto.SSL.Context import Context ctx = Context() # modify context svr = Server(rpc_url, SSL_Transport(ctx), encoding='utf-8') svr.mymethod1(1)

m2crypto https, xmlrpc, and cookies

2011-08-02 Thread Gelonida N
Hi, Just started playing with m2cryptos xmlrpc The code I'm using is: import xmlrpclib from M2Crypto.m2xmlrpclib import Server, SSL_Transport from M2Crypto.SSL.Context import Context ctx = Context() # modify context svr = Server(rpc_url, SSL_Transport(ctx), encoding='utf-8') svr.mymethod1(1) s

m2crypto https, xmlrpc, keep_alive

2011-08-02 Thread Gelonida N
Hi, Just started playing with m2cryptos xmlrpc The code I'm is: import xmlrpclib from M2Crypto.m2xmlrpclib import Server, SSL_Transport from M2Crypto.SSL.Context import Context ctx = Context() # modify context svr = Server(rpc_url, SSL_Transport(ctx), encoding='utf-8') svr.mymethod1(1) svr.myn

ANN: M2Crypto 0.21.1

2011-01-17 Thread Heikki Toivonen
Announcing M2Crypto 0.21.1 Changes: 0.21.1 - 2011-01-15 --- - Distribution fix 0.21 - 2011-01-12 - - Support OpenSSL 1.0. Thanks to Miloslav Trmac for figuring out how to fix test_smime.py - Rename m2.engine_init to engine_init_error so that ENGINE_init and

Re: On 07/13/2010 02:18 PM, Adam Mercer wrote:That version of M2Crypto does not

2010-12-21 Thread Robert Schuon
I was getting the same error trying to build M2Crypto 0.20.2 for Python 2.5 on a Win 7 laptop, so I pulled down the trunk, and it did build properly using minGW and Swig. However, when I try to "python setup.py install", python simply gives the same complaint that python was built

m2crypto, base64, quoted-printable, xml

2010-12-02 Thread Milan Petrasek
use M2crypto to decrypt: from M2Crypto import BIO, SMIME, X509 import os output = open("c://decrypted.txt", 'w') s = SMIME.SMIME() s.load_key('test.pem', 'test.pem') p7, data = SMIME.smime_load_pkcs7('input.txt') out = s.decrypt(p7) output.write(out)

M2crypto/Python 2.7 compatibility (Windows)

2010-10-03 Thread python
Anyone using M2crypto with Python 2.7? The M2crypto site [1] seems to indicate that M2crypto should be compatible with all 2.x versions 2.3 or higher. However there are no user contributed builds for any release of Python above 2.6. I'm wondering if this is because M2crypto has problems

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-17 Thread Adam Mercer
On Sat, Jul 17, 2010 at 15:20, Heikki Toivonen wrote: > I was actually planning on doing a release by the end of June, but life > happened. Maybe by the end of August... Know what whats like :-) I've backported the OpenSSL patches for the MacPorts port so for the time being this particular fire

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-17 Thread Heikki Toivonen
On 07/16/2010 08:18 AM, Adam Mercer wrote: That version of M2Crypto does not work with OpenSSL 1.0.x because OpenSSL changed APIs. M2Crypto trunk works, as will the next M2Crypto release. So at this time, you should check out M2Crypto from the Subversion repository. See http

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-16 Thread Adam Mercer
On Fri, Jul 16, 2010 at 02:09, Heikki Toivonen wrote: > That version of M2Crypto does not work with OpenSSL 1.0.x because OpenSSL > changed APIs. M2Crypto trunk works, as will the next M2Crypto release. So at > this time, you should check out M2Crypto from the Subversion repository. S

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-16 Thread Heikki Toivonen
On 07/13/2010 02:18 PM, Adam Mercer wrote: I'm trying to build M2Crypto on Mac OS X 10.6.4 against python2.5 (python2.6 fails in the same way), with SWIG 2.0.0 and OpenSSL 1.0.0a and it is failing with the following: That version of M2Crypto does not work with OpenSSL 1.0.x because Op

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-15 Thread geremy condra
On Thu, Jul 15, 2010 at 3:03 PM, Adam Mercer wrote: > On Thu, Jul 15, 2010 at 14:10, John Nagle wrote: >>   I had a similar problem back in 2007.  See >> >> http://bytes.com/topic/python/answers/613336-more-m2crypto-build-problems >> >> Also see >> >>

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-15 Thread Adam Mercer
On Thu, Jul 15, 2010 at 14:10, John Nagle wrote: >   I had a similar problem back in 2007.  See > > http://bytes.com/topic/python/answers/613336-more-m2crypto-build-problems > > Also see > > http://bytes.com/topic/python/answers/711381-m2crypto-0-18-new-version-same-old-b

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-15 Thread John Nagle
I had a similar problem back in 2007. See http://bytes.com/topic/python/answers/613336-more-m2crypto-build-problems Also see http://bytes.com/topic/python/answers/711381-m2crypto-0-18-new-version-same-old-build-bugs There have been problems with SWIG. There have been problems with how

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-14 Thread Adam Mercer
Anyone have any ideas about this? Cheers Adam On Tue, Jul 13, 2010 at 16:18, Adam Mercer wrote: > Hi > > I'm trying to build M2Crypto on Mac OS X 10.6.4 against python2.5 > (python2.6 fails in the same way), with SWIG 2.0.0 and OpenSSL 1.0.0a > and it is failing with th

M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-13 Thread Adam Mercer
Hi I'm trying to build M2Crypto on Mac OS X 10.6.4 against python2.5 (python2.6 fails in the same way), with SWIG 2.0.0 and OpenSSL 1.0.0a and it is failing with the following: 105 :info:build swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c 106 :info:build swig -python -I/opt/

[M2Crypto] Problems uploading to IIS using FTP over SSL

2010-02-26 Thread Stephen Nelson-Smith
Hello, System: # rpm -q python m2crypto python-2.4.3-27.el5 m2crypto-0.16-6.el5.6 # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) I have the following method: def ftp_tarball(aggregation_dir, date_format, ftp_server, ftp_user, ftp_pass): date = datetime.today

[M2Crypto] Problems uploading to IIS using FTP over SSL

2010-02-26 Thread Stephen Nelson-Smith
System: # rpm -q python m2crypto python-2.4.3-27.el5 m2crypto-0.16-6.el5.6 # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) I have the following method: def ftp_tarball(aggregation_dir, date_format, ftp_server, ftp_user, ftp_pass): date = datetime.today

ANN: M2Crypto 0.20.2

2009-10-06 Thread Heikki Toivonen
M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCooki

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-02 Thread John Nagle
--- Traceback (most recent call last): File "/var/www/vhosts/sitetruth.com/private/downloads/M2Crypto/M2Crypto-0.20.1/tests/test_ssl.py", line 485, in test_cipher_ok assert s.get_cipher().name() == 'AES128-SHA&

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-01 Thread Heikki Toivonen
> Traceback (most recent call last): > File > "/var/www/vhosts/sitetruth.com/private/downloads/M2Crypto/M2Crypto-0.20.1/tests/test_ssl.py", > line 485, in test_cipher_ok > assert s.get

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-01 Thread John Nagle
Heikki Toivonen wrote: John Nagle wrote: M2Crypto, from http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.20.1.tar.gz won't build on Red Hat Linux / 386. The error is It's some incompatibility between Red Hat include file packaging and M2Crypto. Yup, all Fedora

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-01 Thread Heikki Toivonen
John Nagle wrote: > M2Crypto, from > > http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.20.1.tar.gz > > won't build on Red Hat Linux / 386. The error is > > It's some incompatibility between Red Hat include file packaging and > M2Crypto. Yup, all

M2Crypto 0.20.1 won't build on Red Hat Linux

2009-09-30 Thread John Nagle
M2Crypto, from http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.20.1.tar.gz won't build on Red Hat Linux / 386. The error is swig -python -I/usr/local/include/python2.5 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i /usr/include/openssl/opensslconf

ANN: M2Crypto 0.20.1

2009-08-28 Thread Heikki Toivonen
M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCooki

ANN: M2Crypto 0.20

2009-08-10 Thread Heikki Toivonen
I am please to announce the M2Crypto 0.20 release, which was in development for over nine months. Over 30 bugs fixed by more than ten people. Download links and bug filing instructions on the homepage at http://chandlerproject.org/Projects/MeTooCrypto. M2Crypto is the most complete Python wrapper

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-10 Thread Matthias Güntert
Hello once again Now I have the extension-patch [0] applied to the M2Crypto SVN branch (revision 704). Creating a root and an subRoot CA certificate now works great including the SKID/AKID extensions. I am also able to verify those created certificates using: $ openssl verify -CAfile

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-10 Thread Matthias Güntert
Now I have this patch applied to the M2Crypto SVN branch -- http://mail.python.org/mailman/listinfo/python-list

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-07 Thread Scott David Daniels
Matthias Güntert wrote: M2Crypto has a couple of bugs open related that, with potential workarounds that I haven't yet deemed polished enough to checkin, but which might help you out: https://bugzilla.osafoundation.org/show_bug.cgi?id=7530 https://bugzilla.osafoundation.org/show_bug.c

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-05 Thread Matthias Güntert
> M2Crypto has a couple of bugs open related that, with potential > workarounds that I haven't yet deemed polished enough to checkin, but > which might help you out: > > https://bugzilla.osafoundation.org/show_bug.cgi?id=7530 > https://bugzilla.osafoundation.org/show_b

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-04 Thread Heikki Toivonen
Matthias Güntert wrote: > I am trying to add the extensions "subjectKeyIdentifier" and > "authorityKeyIdentifier" to a x509v3 certificate. M2Crypto has a couple of bugs open related that, with potential workarounds that I haven't yet deemed polished enough to ch

M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-04 Thread Matthias Güntert
e code on how to generate a fingerprint from the public key. "print keyp.final()" nor "print keyp.sign_final() on the last line does return anything... ---- from M2Crypto import X509, m2, RSA, EVP from config import * import

Re: M2Crypto: X509.X509_Extension_Stack() throws AssertionError

2009-08-04 Thread Matthias Güntert
> > cert_extension_2 = X509.new_extension("keyUsage", "10100") > > Maybe your OpenSSL is too old. keyUsage needs to be defined in OpenSSL > obj_dat.h file for this to work. I am using OpenSSL version 0.9.8k-fips which is the latest version. I replaced: cert_extension_2 = X509.new_ext

Re: M2Crypto: X509.X509_Extension_Stack() throws AssertionError

2009-08-03 Thread Heikki Toivonen
AltName. With the change in spelling for subjectAltName your test passes for me using OpenSSL 1.0.0beta3 and M2Crypto 0.20beta with the (still incomplete) patch to make M2Crypto work with OpenSSL 1.0: https://bugzilla.osafoundation.org/show_bug.cgi?id=12855 -- Heikki Toivonen - http://heikkito

M2Crypto: X509.X509_Extension_Stack() throws AssertionError

2009-08-03 Thread Matthias Güntert
M2Crypto import X509 if __name__ == '__main__': cert_extension_stack = X509.X509_Extension_Stack() cert_extension_1 = X509.new_extension("basicConstraints", "CA:FALSE") cert_extension_1.set_critical() cert_extension_2 = X509.new_ex

Re: M2Crypto: AttributeError: 'CSR' object has no attribute 'pkey'

2009-08-01 Thread Heikki Toivonen
Matthias Güntert wrote: > class CSR(object): > def __init__(self): > pass > > def create_cert_signing_request(keypair, cert_name, > cert_extension_stack=None): You missed self. Although this method does not seem to be using any instance data so there isn't actually much reason to

M2Crypto: AttributeError: 'CSR' object has no attribute 'pkey'

2009-08-01 Thread Matthias Güntert
Hello python-guys I am trying to build a python based certificate authority using m2crypto. I am quite new to python and I am asking myself why my code snippets below throw the following Traceback: $ python csr.py ... ... Traceback (most recent call last

Re: M2Crypto hangs on this URL

2009-07-28 Thread Heikki Toivonen
John Nagle wrote: > There's something strange about this URL: > > "https://sagar310.pontins.com/sraep/"; The following program finishes fine for me using M2Crypto 0.20beta1 + openssl 0.9.8g. Like Martin mentioned in another message, maybe someone fixed the site. from

Re: M2Crypto hangs on this URL

2009-07-28 Thread Martin P. Hellwig
ontins.com -port 443 -debug -showcerts -msg eventually prints "Verify return code: 19 (self signed certificate in certificate chain)" That's weird, because there's a Verisign certificate in the chain. That site is somehow mishandling its certs. My problem, though, is that M2Cry

Re: M2Crypto hangs on this URL

2009-07-28 Thread John Nagle
bug -showcerts -msg eventually prints "Verify return code: 19 (self signed certificate in certificate chain)" That's weird, because there's a Verisign certificate in the chain. That site is somehow mishandling its certs. My problem, though, is that M2Crypto 0.17 is hangin

Re: M2Crypto hangs on this URL

2009-07-27 Thread Martin P. Hellwig
he connection to sagar310.pontins.com was interrupted while the page was loading." It hangs M2Crypto 0.17 on both Linux and Windows, for at least 4 hours. Correction: Linux is still hung at 5 hours, but Windows timed out after about 15 minutes. Further update: M2Crypto on Windows now hung on t

Re: M2Crypto hangs on this URL

2009-07-27 Thread John Nagle
ntins.com was interrupted while the page was loading." It hangs M2Crypto 0.17 on both Linux and Windows, for at least 4 hours. Correction: Linux is still hung at 5 hours, but Windows timed out after about 15 minutes. Further update: M2Crypto on Windows now hung on that URL for hou

Re: M2Crypto hangs on this URL

2009-07-27 Thread John Nagle
upted while the page was loading." It hangs M2Crypto 0.17 on both Linux and Windows, for at least 4 hours. Correction: Linux is still hung at 5 hours, but Windows timed out after about 15 minutes. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

M2Crypto hangs on this URL

2009-07-27 Thread John Nagle
e page was loading." It hangs M2Crypto 0.17 on both Linux and Windows, for at least 4 hours. What does the new SSL implementation do? (Haven't tried that yet; waiting for MySQL support for Python 3.x before converting web apps.) John Nagle -- http://mail

SSL Server side Client Certficate Verification in M2Crypto

2009-04-27 Thread Karthik
Hi, I have a small problem using the M2Crypto for SSL certificate verification. I have a client and a server who wants to get the certificates verified by the other in order start the communication. I am able to get the server certificate verified by the client but not the client certificate in

Re: m2crypto loading cert file from memory buffer

2008-12-05 Thread Heikki Toivonen
netpork wrote: > ctx = SSL.Context('sslv3') > ctx.load_cert_chain('client.pem') > > anyone knows a way of loading cert file from memory buffer and not > from a file? Yeah, see for example how I did it for Chandler: http://svn.osafoundation.org/chandler/trunk/chandler/parcels/osaf/framework/certst

m2crypto loading cert file from memory buffer

2008-12-04 Thread netpork
started using m2crypto recently, it works pretty well by now, i just have one question: ctx = SSL.Context('sslv3') ctx.load_cert_chain('client.pem') anyone knows a way of loading cert file from memory buffer and not from a file? i just do not want to have my cert file in the

ANN: M2Crypto 0.19.1

2008-10-12 Thread Heikki Toivonen
The 0.19.1 release fixes the build when OpenSSL has been configured without EC support, thanks to Miloslav Trmac. M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and

ANN: M2Crypto 0.19

2008-10-05 Thread Heikki Toivonen
I am happy to announce the M2Crypto 0.19 release! M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib

Re: Python and M2Crypto question

2008-09-09 Thread Bojan Mihelac
Graham, thanks, I will try with that. On Sep 8, 1:02 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Sep 7, 11:07 pm, Bojan Mihelac <[EMAIL PROTECTED]> wrote: > > > Hi all! > > > I am trying to install M2Crypto to work on OSX10.5 apache > > (mod_py

Re: Python and M2Crypto question

2008-09-07 Thread Graham Dumpleton
On Sep 7, 11:07 pm, Bojan Mihelac <[EMAIL PROTECTED]> wrote: > Hi all! > > I am trying to install M2Crypto to work on OSX10.5 apache > (mod_python). Error I receive: > > Error was: dlopen(/Library/WebServer/eggs/M2Crypto-0.18.2-py2.5- > macosx-10.5-i386.egg-tmp/M2C

Python and M2Crypto question

2008-09-07 Thread Bojan Mihelac
Hi all! I am trying to install M2Crypto to work on OSX10.5 apache (mod_python). Error I receive: Error was: dlopen(/Library/WebServer/eggs/M2Crypto-0.18.2-py2.5- macosx-10.5-i386.egg-tmp/M2Crypto/__m2crypto.so, 2): no suitable image found. Did find: /Library/WebServer/eggs/M2Crypto

'Bad Signature' error with M2Crypto

2008-08-10 Thread Usman Ajmal
is looking fine. If any 'geek' can help me out, i will really be glad. 1. import M2Crypto,sha 2. from M2Crypto import X509, BIO, RSA ,EVP, util 3. #Opening file named newcert.pem in which certificate generated via openssl command is placedu 4. infile = open('/home/usma

ANN: M2Crypto 0.18.2

2007-10-12 Thread Heikki Toivonen
M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCooki

Re: M2Crypto possible intermittent bug

2007-10-11 Thread John Nagle
exception data is a bug. >> >> If you can, build python and m2crypto with debug symbols, and place >> breakpoints in |case SSL_ERROR_SYSCALL| blocks (from _ssl.i). Then rerun >> the tests. That would be my first guess as to where these might be >> coming from. >

Re: M2Crypto possible intermittent bug

2007-10-10 Thread John Nagle
Heikki Toivonen wrote: > John Nagle wrote: >> Still having trouble reproducing the problem. But somewhere, >> something raised that bogus no-error exception three times. >> Anything that returns "(0, 'Error')" as exception data is a bug. > > I

Re: M2Crypto possible intermittent bug

2007-10-10 Thread Heikki Toivonen
John Nagle wrote: > Still having trouble reproducing the problem. But somewhere, > something raised that bogus no-error exception three times. > Anything that returns "(0, 'Error')" as exception data is a bug. If you can, build python and m2crypto with debug symb

Re: M2Crypto possible intermittent bug

2007-10-10 Thread John Nagle
John Nagle wrote: > John Nagle wrote: >> I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm >> running my regression tests. I'm seeing occasional cases where >> M2Crypto raises the exception SSL.SSLError, and the associated >> error

Re: M2Crypto possible intermittent bug

2007-10-10 Thread John Nagle
John Nagle wrote: > I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm > running my regression tests. I'm seeing occasional cases where > M2Crypto raises the exception SSL.SSLError, and the associated > error is "(0, 'Error')"

M2Crypto possible intermittent bug

2007-10-09 Thread John Nagle
I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm running my regression tests. I'm seeing occasional cases where M2Crypto raises the exception SSL.SSLError, and the associated error is "(0, 'Error')", which is the bogus error you get if yo

ANN: M2Crypto 0.18.1

2007-10-08 Thread Heikki Toivonen
M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCooki

Re: M2Crypto 0.18 - new version, same old build bugs - more details

2007-10-03 Thread John Nagle
John Nagle wrote: > Heikki Toivonen wrote: >That's progress, but the build still doesn't work: ... > during a C compile, we get > > SWIG/_m2crypto_wrap.c:2529:18: error: _lib.h: No such file or directory > > and the build goes downhill from there, with many compile errors in the > GCC phase.

Re: M2Crypto 0.18 - new version, same old build bugs - more details

2007-09-25 Thread John Nagle
zilla.osafoundation.org/show_bug.cgi?id=9404 and attached a > patch that should address this for real this time. At least -includeall > appears in my Ubuntu Dapper Drake environment. Could you give it a go > and let me know how it works? That's progress, but the build still

Re: M2Crypto 0.18 - new version, same old build bugs - more details

2007-09-24 Thread Heikki Toivonen
John Nagle wrote: > But notice that the -D entry didn't appear on the SWIG command line. > Neither did the "-includeall". The "swig_opts" values around line > 129 aren't actually being used. I think that's left over from the code > intended > to allow builds with Python 2.3 and earlier. The "sel

Re: M2Crypto 0.18 - new version, same old build bugs - more details

2007-09-24 Thread John Nagle
Heikki Toivonen wrote: > John Nagle wrote: > >>Back in March, I posted this: >> >> >>>Hit that with OpenSSL. Red Hat took elliptical curve cryptography >>>out of Fedora 6 for patent reasons. With that missing, M2Crypto won't >>>bui

Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-21 Thread Heikki Toivonen
John Nagle wrote: > Back in March, I posted this: > >> Hit that with OpenSSL. Red Hat took elliptical curve cryptography >> out of Fedora 6 for patent reasons. With that missing, M2Crypto won't >> build. It ought to; the implementor of M2Crypto thought of that

Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread John Nagle
Paul Boddie wrote: > On 20 Sep, 22:12, John Nagle <[EMAIL PROTECTED]> wrote: > >>That was for M2Crypto 0.17. >> >> It's still broken in M2Crypto 0.18. >> >>And there's no RPM or Windows binary. >> >>Nobody actually

Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread Paul Boddie
On 20 Sep, 22:12, John Nagle <[EMAIL PROTECTED]> wrote: > > That was for M2Crypto 0.17. > > It's still broken in M2Crypto 0.18. > > And there's no RPM or Windows binary. > > Nobody actually uses this stuff, do they? I can find

M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread John Nagle
Back in March, I posted this: > Hit that with OpenSSL. Red Hat took elliptical curve cryptography > out of Fedora 6 for patent reasons. With that missing, M2Crypto won't > build. It ought to; the implementor of M2Crypto thought of that, because > it's an optional

Re: ANN: M2Crypto 0.18

2007-09-17 Thread John Nagle
Heikki Toivonen wrote: > M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, > DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL > functionality to implement clients and servers; HTTPS extensions to > Python's httplib, urllib, and xmlrp

ANN: M2Crypto 0.18

2007-07-27 Thread Heikki Toivonen
M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCooki

Re: M2Crypto-0.17 blocks python threads?

2007-06-03 Thread John Nagle
Heikki Toivonen wrote: > [EMAIL PROTECTED] wrote: > >>I am having a problem with python threads and M2Crypto. It appears >>the M2Crypto used in multi-thread application blocks other threads >>from running: > > > This turned into https://bugzilla.osafo

Re: M2Crypto-0.17 blocks python threads?

2007-06-01 Thread Heikki Toivonen
[EMAIL PROTECTED] wrote: > I am having a problem with python threads and M2Crypto. It appears > the M2Crypto used in multi-thread application blocks other threads > from running: This turned into https://bugzilla.osafoundation.org/show_bug.cgi?id=9401 Thanks for the report! --

M2Crypto-0.17 blocks python threads?

2007-05-31 Thread reizes
I am having a problem with python threads and M2Crypto. It appears the M2Crypto used in multi-thread application blocks other threads from running: Environment: Linux 2.6 (centos 5.0), OpenSSL 0.9.8b, M2Crypto-0.17 I am using echod-thread.py and echo.py as test vehicles. Start up echod

Re: Socket exceptions aren't in the standard exception hierarchy (M2Crypto issue)

2007-04-26 Thread John Nagle
h can be raised by socket operations if M2Crypto is installed. I'm not sure what errors the stock SSL module raises. (I'm running stress tests on a dedicated machine in a colocation facility. It's examining 11,000 known spam and malware sites right now. This exercises the err

Re: More M2Crypto build problems

2007-03-07 Thread John Nagle
Now I understand what's wrong. It's an incompatibility between SWIG, OpenSSL, and M2Crypto. OpenSSL was built with OPENSSL_NO_EC defined. That's actually defined via "opensslconf.h", which includes, based on whether __i386__ is defined, the file "openss

Re: More M2Crypto build problems

2007-03-07 Thread John Nagle
Still more M2Crypto build problems: In M2Crypto's file "SWIG/_ec.i", there's this: #if OPENSSL_VERSION_NUMBER < 0x0090800fL || defined(OPENSSL_NO_EC) #undef OPENSSL_NO_EC %constant OPENSSL_NO_EC = 1; #else %constant OPENSSL_NO_EC = 0; %{ #include #include #incl

More M2Crypto build problems

2007-03-07 Thread John Nagle
Trying to build M2Crypto on a dedicated server running Red Hat Fedora Core 6. I'm trying to do this right, without manual patching. The error message I'm getting during build is: python setup.py build ... swig -python -I/usr/include -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i /usr/inclu

Timeout for M2Crypto working - patch

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

Re: More M2Crypto issues

2007-01-19 Thread John Nagle
Heikki Toivonen wrote: > John Nagle wrote: > >>OpenSSL version: "OpenSSL 0.9.7a Feb 19 2003" > > > Hmm, I've never actually used that old OpenSSL myself, just assumed from > the original author's notes that anything from 0.9.7 onward worked. > Guess not. I am thinking of changing the require

Re: More M2Crypto issues

2007-01-19 Thread Heikki Toivonen
John Nagle wrote: > OpenSSL version: "OpenSSL 0.9.7a Feb 19 2003" Hmm, I've never actually used that old OpenSSL myself, just assumed from the original author's notes that anything from 0.9.7 onward worked. Guess not. I am thinking of changing the requirements to state which one works... I thi

Re: More M2Crypto issues

2007-01-19 Thread John Nagle
Heikki Toivonen wrote: > John Nagle wrote: > >>Actually, at the moment I'm having an M2Crypto problem related >>to a SWIG/OpenSSL conflict. Older versions of OpenSSL have an >>include file that needs __i386__ defined, which is something GCC >>does based on

Re: More M2Crypto issues

2007-01-19 Thread Heikki Toivonen
John Nagle wrote: > Actually, at the moment I'm having an M2Crypto problem related > to a SWIG/OpenSSL conflict. Older versions of OpenSSL have an > include file that needs __i386__ defined, which is something GCC > does based on what platform you're on. SWIG uses CPP,

Re: More M2Crypto issues

2007-01-19 Thread Heikki Toivonen
John Nagle wrote: > 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): [...] >

Re: More M2Crypto issues

2007-01-19 Thread John Nagle
Gabriel Genellina wrote: > At Thursday 18/1/2007 04:41, John Nagle wrote: > On a previous version of M2Crypto that line said: map()[self.ctx] = > self, and that failed too ("unhashable object", I think). > I changed the class _ctxmap (the map() above returns an instance of

  1   2   >