From arno=py at CS.VU.NL Mon Oct 10 15:42:54 2005 From: arno=py at CS.VU.NL (Arno Bakker) Date: Mon, 10 Oct 2005 15:42:54 +0200 Subject: [PYTHON-CRYPTO] Building M2Crypto on Windows using Python 2.4... Message-ID: <20051010134254.GA26656@hydra.cs.vu.nl> Hi I have problems compiling M2Crypto-0.15 on Windows XP with Python 2.4: Setup: - Windows XP SP2, all fixes - official Python 2.4.2 for Windows installer - Win32-OpenSSL 0.9.8 binary distribution - official SWIG 1.3.25 for Windows - Visual Studio .Net 2003 (7.1.3088) - M2Crypto 0.15 checked out of svn.osfoundation.org M2Crypto builds OK, but when I run alltests.py it cannot find the win32process module. Then when I leave out the SSL test I get: .....OPENSSL_Uplink(00D89010,07): no OPENSSL_Applink This is apparently due to some new form of glue between OpenSSL 0.9.8 and Win32. (See "FAQ" file in OpenSSL 0.9.8 source distro). However, when I try to use OpenSSL 0.9.7g (binary distro) I get even bigger problems. alltest.py crashes on an Access Violation Exception in fopen.c, FILE * __cdecl_ _tfsopen( ... ) function. If I try test_dsa.py it crashes with an Access Violation Exception in free.c, void __cdecl_ _free_base( ... ) A friend told me that he got it working on with Python 2.3 and OpenSSL 0.9.8, with VisualStudio 6, but I'd prefer 2.4. Any ideas? Buying the installer is not an option, as I have to add code for elliptic curve crypto, as you may know. Thanks Arno From i.stokes-rees1 at PHYSICS.OX.AC.UK Tue Oct 25 16:37:04 2005 From: i.stokes-rees1 at PHYSICS.OX.AC.UK (Ian Stokes-Rees) Date: Tue, 25 Oct 2005 15:37:04 +0100 Subject: [PYTHON-CRYPTO] MCrypto2 build problems for 0.15 tag Message-ID: <435E4310.50903@physics.ox.ac.uk> I have just downloaded the 0.15 tag of MCrypto2 from mid-August. I get a host of SWIG errors when I try to build. I am using: Python 2.4 Swig 1.3.25 OpenSSL 0.9.7g This is on Scientific Linux SL release 3.0.5 (SL) (an off-shoot of Fedora and RHEL). Anyone know what would cause this? It looks like something is being included twice. Cheers, Ian FWIW, here are a few of the error messages: SWIG/_pkcs7.i:19: Warning(121): %name is deprecated. Use %rename instead. SWIG/_m2crypto_wrap.c: In function `sign_final': SWIG/_m2crypto_wrap.c:3137: warning: unused variable `ret' SWIG/_m2crypto_wrap.c: At top level: SWIG/_m2crypto_wrap.c:4302: conflicting types for `SSL_get_version' /usr/local/include/openssl/ssl.h:1327: previous declaration of `SSL_get_version' SWIG/_m2crypto_wrap.c:4303: conflicting types for `SSL_get_error' /usr/local/include/openssl/ssl.h:1326: previous declaration of `SSL_get_error' SWIG/_m2crypto_wrap.c:4317: conflicting types for `SSL_CTX_get_verify_depth' /usr/local/include/openssl/ssl.h:1249: previous declaration of `SSL_SESSION_get_timeout' SWIG/_m2crypto_wrap.c: In function `ssl_session_read_pem': SWIG/_m2crypto_wrap.c:4832: warning: function declaration isn't a prototype SWIG/_m2crypto_wrap.c: In function `ssl_session_write_pem': SWIG/_m2crypto_wrap.c:4836: warning: function declaration isn't a prototype SWIG/_m2crypto_wrap.c: At top level: SWIG/_m2crypto_wrap.c:4900: conflicting types for `X509_NAME_ENTRY_set_data' /usr/local/include/openssl/x509.h:1052: previous declaration of `X509_NAME_ENTRY_set_data' SWIG/_m2crypto_wrap.c:4903: warning: function declaration isn't a prototype SWIG/_m2crypto_wrap.c:1425: warning: `RCS_id' defined but not used error: command 'gcc' failed with exit status 1 -- Ian Stokes-Rees i.stokes-rees at physics.ox.ac.uk Particle Physics, Oxford http://www-pnp.physics.ox.ac.uk/~stokes -------------- next part -------------- A non-text attachment was scrubbed... Name: i.stokes-rees1.vcf Type: text/x-vcard Size: 338 bytes Desc: not available URL: From conrad at HEP.CALTECH.EDU Tue Oct 25 17:49:28 2005 From: conrad at HEP.CALTECH.EDU (Conrad Steenberg) Date: Tue, 25 Oct 2005 08:49:28 -0700 Subject: [PYTHON-CRYPTO] MCrypto2 build problems for 0.15 tag In-Reply-To: <435E4310.50903@physics.ox.ac.uk> References: <435E4310.50903@physics.ox.ac.uk> Message-ID: <1130255368.3435.5.camel@localhost.localdomain> Hi Ian OpenSSL have been going through a "const"-ifying exercise lately that m2crypto keeps getting bitten by. If you look in http://131.215.116.185/RPM/PKG/ there's a .src.rpm with patches to make m2crypto compile against openssl-0.9.7g, swig-1.3.24, and python-2.4.2. HTH! Conrad On Tue, 2005-10-25 at 15:37 +0100, Ian Stokes-Rees wrote: > I have just downloaded the 0.15 tag of MCrypto2 from mid-August. I get > a host of SWIG errors when I try to build. I am using: > > Python 2.4 > Swig 1.3.25 > OpenSSL 0.9.7g > > This is on Scientific Linux SL release 3.0.5 (SL) (an off-shoot of > Fedora and RHEL). > > Anyone know what would cause this? It looks like something is being > included twice. > > Cheers, Ian > > FWIW, here are a few of the error messages: > > SWIG/_pkcs7.i:19: Warning(121): %name is deprecated. Use %rename instead. > SWIG/_m2crypto_wrap.c: In function `sign_final': > SWIG/_m2crypto_wrap.c:3137: warning: unused variable `ret' > SWIG/_m2crypto_wrap.c: At top level: > SWIG/_m2crypto_wrap.c:4302: conflicting types for `SSL_get_version' > /usr/local/include/openssl/ssl.h:1327: previous declaration of > `SSL_get_version' > SWIG/_m2crypto_wrap.c:4303: conflicting types for `SSL_get_error' > /usr/local/include/openssl/ssl.h:1326: previous declaration of > `SSL_get_error' > SWIG/_m2crypto_wrap.c:4317: conflicting types for `SSL_CTX_get_verify_depth' > /usr/local/include/openssl/ssl.h:1249: previous declaration of > `SSL_SESSION_get_timeout' > SWIG/_m2crypto_wrap.c: In function `ssl_session_read_pem': > SWIG/_m2crypto_wrap.c:4832: warning: function declaration isn't a prototype > SWIG/_m2crypto_wrap.c: In function `ssl_session_write_pem': > SWIG/_m2crypto_wrap.c:4836: warning: function declaration isn't a prototype > SWIG/_m2crypto_wrap.c: At top level: > SWIG/_m2crypto_wrap.c:4900: conflicting types for `X509_NAME_ENTRY_set_data' > /usr/local/include/openssl/x509.h:1052: previous declaration of > `X509_NAME_ENTRY_set_data' > SWIG/_m2crypto_wrap.c:4903: warning: function declaration isn't a prototype > SWIG/_m2crypto_wrap.c:1425: warning: `RCS_id' defined but not used > error: command 'gcc' failed with exit status 1 > -- Conrad Steenberg California Institute of Technology -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 2531 bytes Desc: not available URL: From i.stokes-rees1 at PHYSICS.OX.AC.UK Wed Oct 26 13:59:24 2005 From: i.stokes-rees1 at PHYSICS.OX.AC.UK (Ian Stokes-Rees) Date: Wed, 26 Oct 2005 12:59:24 +0100 Subject: [PYTHON-CRYPTO] MCrypto2 build problems for 0.15 tag In-Reply-To: <1130255368.3435.5.camel@localhost.localdomain> References: <435E4310.50903@physics.ox.ac.uk> <1130255368.3435.5.camel@localhost.localdomain> Message-ID: <435F6F9C.3010901@physics.ox.ac.uk> Hi Conrad, Conrad Steenberg wrote: > OpenSSL have been going through a "const"-ifying exercise lately that > m2crypto keeps getting bitten by. > > If you look in http://131.215.116.185/RPM/PKG/ there's a .src.rpm with > patches to make m2crypto compile against openssl-0.9.7g, swig-1.3.24, > and python-2.4.2. Thanks for this. I still end up with 3 pesky errors. I'm not using OpenPKG, so I have to manually apply the patches (m2crypto-0.11.getkey.diff, patch.makefile3, openssl-0.9.8a.diff) and fix the Makefile. The errors are: _m2crypto_wrap.c:5129: conflicting types for `c2i_ASN1_OBJECT' openssl/asn1.h:704: previous declaration of `c2i_ASN1_OBJECT' _m2crypto_wrap.c:5130: conflicting types for `d2i_ASN1_OBJECT' openssl/asn1.h:706: previous declaration of `d2i_ASN1_OBJECT' _m2crypto_wrap.c:5140: conflicting types for `ASN1_UTCTIME_set_string' openssl/asn1.h:759: previous declaration of `ASN1_UTCTIME_set_string' and one SWIG error (repeated many many times): Warning(121): %name is deprecated. Use %rename instead. If I comment out the problematic declarations in _m2crypto_wrap.c the errors turn into warnings: _m2crypto_wrap.c:16371: warning: passing arg 2 of `c2i_ASN1_OBJECT' from incompatible pointer type _m2crypto_wrap.c:16399: warning: passing arg 2 of `d2i_ASN1_OBJECT' from incompatible pointer type _m2crypto_wrap.c:16642: warning: passing arg 2 of `ASN1_UTCTIME_set_string' discards qualifiers from pointer target type But those sound dangerous. What am I doing wrong? TIA, Ian -- Ian Stokes-Rees i.stokes-rees at physics.ox.ac.uk Particle Physics, Oxford http://www-pnp.physics.ox.ac.uk/~stokes -------------- next part -------------- A non-text attachment was scrubbed... Name: i.stokes-rees1.vcf Type: text/x-vcard Size: 338 bytes Desc: not available URL: From conrad at HEP.CALTECH.EDU Wed Oct 26 17:16:20 2005 From: conrad at HEP.CALTECH.EDU (Conrad Steenberg) Date: Wed, 26 Oct 2005 08:16:20 -0700 Subject: [PYTHON-CRYPTO] MCrypto2 build problems for 0.15 tag In-Reply-To: <435F6F9C.3010901@physics.ox.ac.uk> References: <435E4310.50903@physics.ox.ac.uk> <1130255368.3435.5.camel@localhost.localdomain> <435F6F9C.3010901@physics.ox.ac.uk> Message-ID: <1130339780.2790.16.camel@localhost.localdomain> Hi Ian On Wed, 2005-10-26 at 12:59 +0100, Ian Stokes-Rees wrote: > Hi Conrad, > > Conrad Steenberg wrote: > > OpenSSL have been going through a "const"-ifying exercise lately that > > m2crypto keeps getting bitten by. > > > > If you look in http://131.215.116.185/RPM/PKG/ there's a .src.rpm with > > patches to make m2crypto compile against openssl-0.9.7g, swig-1.3.24, > > and python-2.4.2. > > Thanks for this. I still end up with 3 pesky errors. I'm not using > OpenPKG, so I have to manually apply the patches > (m2crypto-0.11.getkey.diff, patch.makefile3, openssl-0.9.8a.diff) and > fix the Makefile. The errors are: > > _m2crypto_wrap.c:5129: conflicting types for `c2i_ASN1_OBJECT' > openssl/asn1.h:704: previous declaration of `c2i_ASN1_OBJECT' > > _m2crypto_wrap.c:5130: conflicting types for `d2i_ASN1_OBJECT' > openssl/asn1.h:706: previous declaration of `d2i_ASN1_OBJECT' > > _m2crypto_wrap.c:5140: conflicting types for `ASN1_UTCTIME_set_string' > openssl/asn1.h:759: previous declaration of `ASN1_UTCTIME_set_string' > My patch was for SWIG-1.3.24, so it seems like there was another const-related change in .25 :-( > and one SWIG error (repeated many many times): > > Warning(121): %name is deprecated. Use %rename instead. The m2c code should be updated to use the %rename directive, but for now the above is just a warning. Annoying, but it still works. > > If I comment out the problematic declarations in _m2crypto_wrap.c the > errors turn into warnings: The best place to fix this is in SWIG/_asn1.i and make a patch that you can apply. > > _m2crypto_wrap.c:16371: warning: passing arg 2 of `c2i_ASN1_OBJECT' from > incompatible pointer type > > _m2crypto_wrap.c:16399: warning: passing arg 2 of `d2i_ASN1_OBJECT' from > incompatible pointer type > > _m2crypto_wrap.c:16642: warning: passing arg 2 of > `ASN1_UTCTIME_set_string' discards qualifiers from pointer target type > > But those sound dangerous. What am I doing wrong? Nothing. The patches simply needed to be updated slightly. These are all related to const qualifiers added to the openssl headers, but not to the .i files. Look for the definitions of the above objects in SWIG/_asn1.i and add/remove the const qualifiers to match the openssl headers. Btw, this seems to expose a serious flaw in the SWIG methodology, imho: having to copy large portions of library header files that needed to be wrapped. The Pyrex tool has the same problem. OK, I'll shut up now ;-) Cheers Conrad > > TIA, Ian > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 2531 bytes Desc: not available URL: From michael at STROEDER.COM Thu Oct 27 11:16:18 2005 From: michael at STROEDER.COM (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Thu, 27 Oct 2005 11:16:18 +0200 Subject: [PYTHON-CRYPTO] M2Crypto release 0.15 In-Reply-To: <4303CBC5.3010304@osafoundation.org> References: <4303CBC5.3010304@osafoundation.org> Message-ID: <43609AE2.7040905@stroeder.com> Heikki Toivonen wrote: > M2crypto release 0.15 > [..] > To get the source: > > svn co http://svn.osafoundation.org/m2crypto/tags/0.15 m2crypto-0.15 Not everybody has svn installed or direct access to a SVN repository. Therefore I'd appreciate an official download link to an ordinary .tar.gz or .zip file. Is there one? Ciao, Michael. From heikki at OSAFOUNDATION.ORG Thu Oct 27 20:25:56 2005 From: heikki at OSAFOUNDATION.ORG (Heikki Toivonen) Date: Thu, 27 Oct 2005 11:25:56 -0700 Subject: [PYTHON-CRYPTO] M2Crypto release 0.15 In-Reply-To: <43609AE2.7040905@stroeder.com> References: <4303CBC5.3010304@osafoundation.org> <43609AE2.7040905@stroeder.com> Message-ID: <43611BB4.4040104@osafoundation.org> Michael Str?der wrote: > Not everybody has svn installed or direct access to a SVN repository. > Therefore I'd appreciate an official download link to an ordinary > .tar.gz or .zip file. Is there one? I just put up a tarball here: http://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto I am hoping Ng would get some time to put this up on the official M2Crypto homepage as well... -- Heikki Toivonen -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 253 bytes Desc: OpenPGP digital signature URL: From heikki at osafoundation.org Thu Oct 27 20:25:56 2005 From: heikki at osafoundation.org (Heikki Toivonen) Date: Thu, 27 Oct 2005 11:25:56 -0700 Subject: [PYTHON-CRYPTO] M2Crypto release 0.15 In-Reply-To: <43609AE2.7040905@stroeder.com> References: <4303CBC5.3010304@osafoundation.org> <43609AE2.7040905@stroeder.com> Message-ID: <43611BB4.4040104@osafoundation.org> Michael Str?der wrote: > Not everybody has svn installed or direct access to a SVN repository. > Therefore I'd appreciate an official download link to an ordinary > .tar.gz or .zip file. Is there one? I just put up a tarball here: http://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto I am hoping Ng would get some time to put this up on the official M2Crypto homepage as well... -- Heikki Toivonen -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 253 bytes Desc: OpenPGP digital signature URL: