[zeromq-dev] PyZMQ with Libsodium on Windows?
André Caron
andre.l.caron at gmail.com
Sat Oct 11 22:15:06 CEST 2014
Hi again!
OK, so I managed building libsodium on Windows with MSVC 2008 to match
Python 2.7. Simply required creating a VS solution and include all the
source files. The only problems I ran into are:
1) <stdint.h> is not provided with MSVC 2008, so I added a stub for it
within the solution in order to build; and
2) there are some "static inline" function declarations which are rejected
by the compiler, so I removed the "inline" (which is optional).
So I now have a "libsodium.lib" and a "libsodium.dll".
Once I have a proof of concept that's working inside PyZMQ, I'll see if I
can get this MSVC 2008 solution included upstream in libsodium.
However, I'm not familiar with Python bundling process. How should I
provide the libsodium headers, lib & dll files to PyZMQ? What commands do
you run to create the PyZMQ egg and whl bundles once I've made libsodium
available to PyZMQ?
Thanks,
André
On Fri, Oct 10, 2014 at 5:36 AM, Frank Hartmann <soundart at gmx.net> wrote:
> Hi,
>
> Tweetnacl linux integration has been added to libzmq some month ago.
>
> You could try compiling with tweetnacl and VS2008. One(only?) thing
> missing is randombytes() function on windows.
>
> Probably MS has a crypto API somewhere which should make this simple, if
> you trust them. And you can check how libsodium does it.
>
> regards
> Frank
>
> Min RK <benjaminrk at gmail.com> writes:
>
> > For pyzmq, it must work with VC9 (VS2008), for Python 2.7.
> >
> > -MinRK
> >
> >> On Oct 9, 2014, at 18:08, Steven McCoy <steven.mccoy at miru.hk> wrote:
> >>
> >> I think it is easier now as they have more support than just MSVC2013
> (C99 compat) when crypto was added to ZeroMQ.
> >>
> >>> On 9 October 2014 17:47, MinRK <benjaminrk at gmail.com> wrote:
> >>> It's not bundled simply because I couldn't build it on Windows. If you
> can come up with a simple fix for building bundled libsodium, then I would
> bundle libsodium on Windows.
> >>>
> >>> -MinRK
> >>>
> >>>> On Thu, Oct 9, 2014 at 1:48 PM, André Caron <andre.l.caron at gmail.com>
> wrote:
> >>>> Hi there!
> >>>>
> >>>> I'm trying to secure some PyZMQ communications with the curve
> security features. The code seems straightforward, but when I call
> `zmq.auth.create_certificates()` to generate some keys, I get the following
> exception:
> >>>>
> >>>> zmq.error.ZMQError: Not supported
> >>>>
> >>>> This seems to be due to the absence of libsodium.
> >>>>
> >>>> In the release notes for PyZMQ 14.1.0, I can see that libsodium is
> not bundled with PyZMQ on Windows.
> >>>>
> >>>> First, I'm curious to know why it's not bundled on Windows. If it's
> simply a matter of finding a volunteer, maybe I can pitch in?
> >>>>
> >>>> Second, I'd like to know if there's any known procedure to get it
> running on Windows?
> >>>>
> >>>> Thanks!
> >>>>
> >>>> André
> >>>>
> >>>> _______________________________________________
> >>>> zeromq-dev mailing list
> >>>> zeromq-dev at lists.zeromq.org
> >>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >>>
> >>>
> >>> _______________________________________________
> >>> zeromq-dev mailing list
> >>> zeromq-dev at lists.zeromq.org
> >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >>
> >> _______________________________________________
> >> zeromq-dev mailing list
> >> zeromq-dev at lists.zeromq.org
> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141011/5118cecf/attachment.htm>
More information about the zeromq-dev
mailing list