[ANN] M2Crypto 0.27.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] M2Crypto 0.27.0

Matěj Cepl
M2Crypto is the most complete Python wrapper for OpenSSL
featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric
ciphers; SSL functionality to implement clients and servers;
HTTPS extensions to Python’s httplib, urllib, and xmlrpclib;
unforgeable HMAC’ing AuthCookies for web session management;
FTP/TLS client and server; S/MIME. M2Crypto can also be used to
provide SSL for Twisted. Smartcards supported through the Engine
interface.

This is another less earth-shattering release (after 0.26.2 which
brought us OpenSSL 1.1.0 compatbility), one more step towards
Python 3 compatibility nirvana, still more cleanups and
accumulated bug fixes, which could be resolved before the big
python3 branch is merged.

The release is available on
https://pypi.python.org/pypi/M2Crypto/ and all communication with
the maintainer (that’s me) should go to
https://gitlab.com/m2crypto/m2crypto.

Talking about the python3 branch, ALL TESTS PASS on all Pythons
from 2.6, 2.7, 3.3 to 3.6!!!

Now is the time to test, help with review, and complain about
whatever is wrong! I will still keep API stable, but changes are
relatively large, so this is your opportunity to suggest whatever
substantial thing you don't like with M2Crypto. I may not make it
happen in 0.28 (which I expect to be Py3k-compatible release),
but for settling the dust down and cleanup I prepare already
0.29, which should include yet more acummulated merge requests
and bugfixes, this time ones which should be better served with
python 3 layer already happening.

Happy hacking!

Matěj

--
https://matej.ceplovi.cz/blog/, Jabber: [hidden email]
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
Quod fuimus, estis; quod sumus, vos eritis.

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] M2Crypto 0.27.0

Blumenthal, Uri - 0553 - MITLL
I have to report that this M2Crypto release is broken, as it cannot find OpenSSL installed in /opt/local (apologies for spamming multiple lists and people):

/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/private/tmp/pip-build-lqb2R6/M2Crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.macosx-10.12-x86_64-2.7/SWIG/_m2crypto_wrap.o -Wno-deprecated-declarations
    SWIG/_m2crypto_wrap.c:2894:9: warning: variable 'res' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (PyType_Ready(tp) < 0)
            ^~~~~~~~~~~~~~~~~~~~
    SWIG/_m2crypto_wrap.c:2918:10: note: uninitialized use occurs here
      return res;
             ^~~
    SWIG/_m2crypto_wrap.c:2894:5: note: remove the 'if' if its condition is always false
        if (PyType_Ready(tp) < 0)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    SWIG/_m2crypto_wrap.c:2875:10: note: initialize the variable 'res' to silence this warning
      int res;
             ^
              = 0
    SWIG/_m2crypto_wrap.c:3554:10: fatal error: 'openssl/err.h' file not found
    #include <openssl/err.h>
             ^~~~~~~~~~~~~~~
    1 warning and 1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1
   
    ----------------------------------------
Command "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-lqb2R6/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-VYOp3p-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-lqb2R6/M2Crypto/

--
Regards,
Uri Blumenthal

On 10/5/17, 18:06, "openssl-users on behalf of Matěj Cepl" <[hidden email] on behalf of [hidden email]> wrote:

    M2Crypto is the most complete Python wrapper for OpenSSL
    featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric
    ciphers; SSL functionality to implement clients and servers;
    HTTPS extensions to Python’s httplib, urllib, and xmlrpclib;
    unforgeable HMAC’ing AuthCookies for web session management;
    FTP/TLS client and server; S/MIME. M2Crypto can also be used to
    provide SSL for Twisted. Smartcards supported through the Engine
    interface.
   
    This is another less earth-shattering release (after 0.26.2 which
    brought us OpenSSL 1.1.0 compatbility), one more step towards
    Python 3 compatibility nirvana, still more cleanups and
    accumulated bug fixes, which could be resolved before the big
    python3 branch is merged.
   
    The release is available on
    https://pypi.python.org/pypi/M2Crypto/ and all communication with
    the maintainer (that’s me) should go to
    https://gitlab.com/m2crypto/m2crypto.
   
    Talking about the python3 branch, ALL TESTS PASS on all Pythons
    from 2.6, 2.7, 3.3 to 3.6!!!
   
    Now is the time to test, help with review, and complain about
    whatever is wrong! I will still keep API stable, but changes are
    relatively large, so this is your opportunity to suggest whatever
    substantial thing you don't like with M2Crypto. I may not make it
    happen in 0.28 (which I expect to be Py3k-compatible release),
    but for settling the dust down and cleanup I prepare already
    0.29, which should include yet more acummulated merge requests
    and bugfixes, this time ones which should be better served with
    python 3 layer already happening.
   
    Happy hacking!
   
    Matěj
   
    --
    https://matej.ceplovi.cz/blog/, Jabber: [hidden email]
    GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
     
    Quod fuimus, estis; quod sumus, vos eritis.
   

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

OpenSSL on side [Was: Re: [ANN] M2Crypto 0.27.0]

Matěj Cepl
On 2017-10-10, 21:17 GMT, Blumenthal, Uri - 0553 - MITLL wrote:
> I have to report that this M2Crypto release is broken, as it
> cannot find OpenSSL installed in /opt/local (apologies for
> spamming multiple lists and people):

Feel free to file a ticket on
https://gitlab.com/m2crypto/m2crypto/issues , no need to use
mailing lists for issue tracker, when we have a proper one.  
I work on M2Crypto right now, so I see them immediately.

To your real problem: does --openssl set to /opt/local help? If
you run

python setup.py clean build --openssl /opt/local

what happens? What is the generated swig line (which version you
use?), and what are the two compiler lines (one for compilation,
other for linking)?

> /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe

I have made so far all my testing with GCC (on Linux, there are
some users on Mac OS X, so I guess CLang should work as well,
but I have never tested it myself).

>     -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
>     -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
>     -I/private/tmp/pip-build-lqb2R6/M2Crypto/SWIG -c
>     SWIG/_m2crypto_wrap.c -o
>     build/temp.macosx-10.12-x86_64-2.7/SWIG/_m2crypto_wrap.o
>     -Wno-deprecated-declarations
>     SWIG/_m2crypto_wrap.c:2894:9: warning: variable 'res' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
>         if (PyType_Ready(tp) < 0)
>             ^~~~~~~~~~~~~~~~~~~~
>     SWIG/_m2crypto_wrap.c:2918:10: note: uninitialized use occurs here
>       return res;
>              ^~~
>     SWIG/_m2crypto_wrap.c:2894:5: note: remove the 'if' if its condition is always false
>         if (PyType_Ready(tp) < 0)
>         ^~~~~~~~~~~~~~~~~~~~~~~~~
>     SWIG/_m2crypto_wrap.c:2875:10: note: initialize the variable 'res' to silence this warning
>       int res;
>              ^
>               = 0

Just to note that this particular piece of code is generated
completely by swig, I have nothing to do with it.

>     SWIG/_m2crypto_wrap.c:3554:10: fatal error: 'openssl/err.h' file not found
>     #include <openssl/err.h>
>              ^~~~~~~~~~~~~~~
>     1 warning and 1 error generated.
>     error: command '/usr/bin/clang' failed with exit status 1

Where do you actually have err.h? Manually settings CFLAGS and
LDFLAGS should be followed by seutp.py, it can help as
a workaround, but my dream is that plain settings of --openssl
parameter should be sufficient.

Feel free to continue here, on on the issue tracker.

Best,

Matěj Cepl
--
http://matej.ceplovi.cz/blog/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
Love doesn't just sit there, like a stone; it has to be made,
like bread, remade all the time, made new.
  -- Ursula K. LeGuin

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL on side

Richard Levitte - VMS Whacker-2
I got curious and decided to take a look, and well, it appears
setup.py has issues.  I posted an issue in gitlab about it:

https://gitlab.com/m2crypto/m2crypto/issues/184

In message <[hidden email]> on Wed, 11 Oct 2017 08:12:38 +0200, Matěj Cepl <[hidden email]> said:

mcepl> On 2017-10-10, 21:17 GMT, Blumenthal, Uri - 0553 - MITLL wrote:
mcepl> > I have to report that this M2Crypto release is broken, as it
mcepl> > cannot find OpenSSL installed in /opt/local (apologies for
mcepl> > spamming multiple lists and people):
mcepl>
mcepl> Feel free to file a ticket on
mcepl> https://gitlab.com/m2crypto/m2crypto/issues , no need to use
mcepl> mailing lists for issue tracker, when we have a proper one.  
mcepl> I work on M2Crypto right now, so I see them immediately.
mcepl>
mcepl> To your real problem: does --openssl set to /opt/local help? If
mcepl> you run
mcepl>
mcepl> python setup.py clean build --openssl /opt/local
mcepl>
mcepl> what happens? What is the generated swig line (which version you
mcepl> use?), and what are the two compiler lines (one for compilation,
mcepl> other for linking)?
mcepl>
mcepl> > /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe
mcepl>
mcepl> I have made so far all my testing with GCC (on Linux, there are
mcepl> some users on Mac OS X, so I guess CLang should work as well,
mcepl> but I have never tested it myself).
mcepl>
mcepl> >     -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
mcepl> >     -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
mcepl> >     -I/private/tmp/pip-build-lqb2R6/M2Crypto/SWIG -c
mcepl> >     SWIG/_m2crypto_wrap.c -o
mcepl> >     build/temp.macosx-10.12-x86_64-2.7/SWIG/_m2crypto_wrap.o
mcepl> >     -Wno-deprecated-declarations
mcepl> >     SWIG/_m2crypto_wrap.c:2894:9: warning: variable 'res' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
mcepl> >         if (PyType_Ready(tp) < 0)
mcepl> >             ^~~~~~~~~~~~~~~~~~~~
mcepl> >     SWIG/_m2crypto_wrap.c:2918:10: note: uninitialized use occurs here
mcepl> >       return res;
mcepl> >              ^~~
mcepl> >     SWIG/_m2crypto_wrap.c:2894:5: note: remove the 'if' if its condition is always false
mcepl> >         if (PyType_Ready(tp) < 0)
mcepl> >         ^~~~~~~~~~~~~~~~~~~~~~~~~
mcepl> >     SWIG/_m2crypto_wrap.c:2875:10: note: initialize the variable 'res' to silence this warning
mcepl> >       int res;
mcepl> >              ^
mcepl> >               = 0
mcepl>
mcepl> Just to note that this particular piece of code is generated
mcepl> completely by swig, I have nothing to do with it.
mcepl>
mcepl> >     SWIG/_m2crypto_wrap.c:3554:10: fatal error: 'openssl/err.h' file not found
mcepl> >     #include <openssl/err.h>
mcepl> >              ^~~~~~~~~~~~~~~
mcepl> >     1 warning and 1 error generated.
mcepl> >     error: command '/usr/bin/clang' failed with exit status 1
mcepl>
mcepl> Where do you actually have err.h? Manually settings CFLAGS and
mcepl> LDFLAGS should be followed by seutp.py, it can help as
mcepl> a workaround, but my dream is that plain settings of --openssl
mcepl> parameter should be sufficient.
mcepl>
mcepl> Feel free to continue here, on on the issue tracker.
mcepl>
mcepl> Best,
mcepl>
mcepl> Matěj Cepl
mcepl> --
mcepl> http://matej.ceplovi.cz/blog/, Jabber: mcepl<at>ceplovi.cz
mcepl> GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
mcepl>  
mcepl> Love doesn't just sit there, like a stone; it has to be made,
mcepl> like bread, remade all the time, made new.
mcepl>   -- Ursula K. LeGuin
mcepl>
mcepl>
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL on side

Blumenthal, Uri - 0553 - MITLL
And it is not installable via PIP, though to me being placed on pypi site suggested that it should be (that's how I tried to install it).

Regards,
Uri

Sent from my iPhone

On Oct 11, 2017, at 06:55, Richard Levitte <[hidden email]> wrote:

I got curious and decided to take a look, and well, it appears
setup.py has issues.  I posted an issue in gitlab about it:

https://gitlab.com/m2crypto/m2crypto/issues/184

In message <[hidden email]> on Wed, 11 Oct 2017 08:12:38 +0200, Matěj Cepl <[hidden email]> said:

mcepl> On 2017-10-10, 21:17 GMT, Blumenthal, Uri - 0553 - MITLL wrote:
mcepl> > I have to report that this M2Crypto release is broken, as it
mcepl> > cannot find OpenSSL installed in /opt/local (apologies for
mcepl> > spamming multiple lists and people):
mcepl>
mcepl> Feel free to file a ticket on
mcepl> https://gitlab.com/m2crypto/m2crypto/issues , no need to use
mcepl> mailing lists for issue tracker, when we have a proper one.  
mcepl> I work on M2Crypto right now, so I see them immediately.
mcepl>
mcepl> To your real problem: does --openssl set to /opt/local help? If
mcepl> you run
mcepl>
mcepl> python setup.py clean build --openssl /opt/local
mcepl>
mcepl> what happens? What is the generated swig line (which version you
mcepl> use?), and what are the two compiler lines (one for compilation,
mcepl> other for linking)?
mcepl>
mcepl> > /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe
mcepl>
mcepl> I have made so far all my testing with GCC (on Linux, there are
mcepl> some users on Mac OS X, so I guess CLang should work as well,
mcepl> but I have never tested it myself).
mcepl>
mcepl> >     -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
mcepl> >     -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
mcepl> >     -I/private/tmp/pip-build-lqb2R6/M2Crypto/SWIG -c
mcepl> >     SWIG/_m2crypto_wrap.c -o
mcepl> >     build/temp.macosx-10.12-x86_64-2.7/SWIG/_m2crypto_wrap.o
mcepl> >     -Wno-deprecated-declarations
mcepl> >     SWIG/_m2crypto_wrap.c:2894:9: warning: variable 'res' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
mcepl> >         if (PyType_Ready(tp) < 0)
mcepl> >             ^~~~~~~~~~~~~~~~~~~~
mcepl> >     SWIG/_m2crypto_wrap.c:2918:10: note: uninitialized use occurs here
mcepl> >       return res;
mcepl> >              ^~~
mcepl> >     SWIG/_m2crypto_wrap.c:2894:5: note: remove the 'if' if its condition is always false
mcepl> >         if (PyType_Ready(tp) < 0)
mcepl> >         ^~~~~~~~~~~~~~~~~~~~~~~~~
mcepl> >     SWIG/_m2crypto_wrap.c:2875:10: note: initialize the variable 'res' to silence this warning
mcepl> >       int res;
mcepl> >              ^
mcepl> >               = 0
mcepl>
mcepl> Just to note that this particular piece of code is generated
mcepl> completely by swig, I have nothing to do with it.
mcepl>
mcepl> >     SWIG/_m2crypto_wrap.c:3554:10: fatal error: 'openssl/err.h' file not found
mcepl> >     #include <openssl/err.h>
mcepl> >              ^~~~~~~~~~~~~~~
mcepl> >     1 warning and 1 error generated.
mcepl> >     error: command '/usr/bin/clang' failed with exit status 1
mcepl>
mcepl> Where do you actually have err.h? Manually settings CFLAGS and
mcepl> LDFLAGS should be followed by seutp.py, it can help as
mcepl> a workaround, but my dream is that plain settings of --openssl
mcepl> parameter should be sufficient.
mcepl>
mcepl> Feel free to continue here, on on the issue tracker.
mcepl>
mcepl> Best,
mcepl>
mcepl> Matěj Cepl
mcepl> --
mcepl> http://matej.ceplovi.cz/blog/, Jabber: mcepl<at>ceplovi.cz
mcepl> GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
mcepl>  
mcepl> Love doesn't just sit there, like a stone; it has to be made,
mcepl> like bread, remade all the time, made new.
mcepl>   -- Ursula K. LeGuin
mcepl>
mcepl>
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL on side

Matěj Cepl
On 2017-10-11, 11:35 GMT, Blumenthal, Uri - 0553 - MITLL wrote:
> And it is not installable via PIP, though to me being placed
> on pypi site suggested that it should be (that's how I tried
> to install it).

What’s needed for package to be pip installable? I would think
that if

    python setup.py build install

works (and it should), then pip should do somehow the right
thing?

Best,

Matěj
--
http://matej.ceplovi.cz/blog/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
If we rise from prayer better persons, our prayers have been
answered.
  -- a Jewish prayer book

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL on side

Blumenthal, Uri - 0553 - MITLL
Unfortunately, not quite. Being pip-installable means to the majority of users that the package in question can be installed via, e.g.,

   pip install M2Crypto

Regards,
Uri

Sent from my iPhone

On Oct 11, 2017, at 08:01, Matěj Cepl <[hidden email]> wrote:

On 2017-10-11, 11:35 GMT, Blumenthal, Uri - 0553 - MITLL wrote:
And it is not installable via PIP, though to me being placed
on pypi site suggested that it should be (that's how I tried
to install it).

What’s needed for package to be pip installable? I would think
that if

   python setup.py build install

works (and it should), then pip should do somehow the right
thing?

Best,

Matěj
--
http://matej.ceplovi.cz/blog/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8

If we rise from prayer better persons, our prayers have been
answered.
 -- a Jewish prayer book

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL on side

Matěj Cepl
On 2017-10-11, 12:11 GMT, Blumenthal, Uri - 0553 - MITLL wrote:
> Unfortunately, not quite. Being pip-installable means to the
> majority of users that the package in question can be
> installed via, e.g.,
>
>    pip install M2Crypto

I understand that, my question was whether you know how to make
package with working python setup.py build to be
pip-installable.

Thanks,

Matěj
--
http://matej.ceplovi.cz/blog/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
I love deadlines. I like the whooshing sound they make as they
fly by.
  -- Douglas Adams, The Salmon of Doubt

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL on side

Blumenthal, Uri - 0553 - MITLL
The only thing I can think of is making sure that inside the setup.py CFLAGS are set properly, including appropriate -I/opt/local/include and whatever else...

Regards,
Uri

Sent from my iPhone

On Oct 11, 2017, at 12:03, Matěj Cepl <[hidden email]> wrote:

On 2017-10-11, 12:11 GMT, Blumenthal, Uri - 0553 - MITLL wrote:
Unfortunately, not quite. Being pip-installable means to the
majority of users that the package in question can be
installed via, e.g.,

  pip install M2Crypto

I understand that, my question was whether you know how to make
package with working python setup.py build to be
pip-installable.

Thanks,

Matěj
--
http://matej.ceplovi.cz/blog/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8

I love deadlines. I like the whooshing sound they make as they
fly by.
 -- Douglas Adams, The Salmon of Doubt

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

smime.p7s (7K) Download Attachment