[zeromq-dev] Implementing zeromq security

Phillip Mienk mienkphi at gmail.com
Sun Dec 14 22:31:25 CET 2014


For clarity, are you relying on zeromq/libzmq, zeromq/zeromq4-1 or
zeromq/zeromq4-x?

Using zeromq/libzmq or zeromq/zeromq4-1:

In the first two, builds/msvc/vs2013/libzmq.sln provides a solution file
referencing all projects.  In the Solution Explorer, right click and select
'Properties' to reach a screen with 'Configuration Properties' accessable.
>From here you can reach 'ZMQ Options'.  By default, sodium is enabled which
will define HAVE_LIBSODIUM.

Linking in libsodium is handled by 'Local Dependencies', a peer of 'ZMQ
Options'.  It contains 'libsodium' and 'Linkage' which are currently by
default linked.  Please note that nuget will be used to pull down the
libsodium package for linking.

Using zeromq/zeromq4-x:

A quick look shows that somehow this repo does not contain the latest
refactor of project files.  I know evoskuil put in a significant effort to
achieve the above and so would advise taking a look at the 4-1 variant if
at all possible.

-- Phillip

On Sun, Dec 14, 2014 at 5:24 AM, Riskybiz <riskybizlive at live.com> wrote:
>
> Thanks for the suggestions on how to build zeromq-4.0.4 with libsodium
> curve security on Windows using the Visual Studio 2013 solution file.
>
>
>
> Getting warmer but there are still some issues………
>
>
>
> I’ve made this modification;
>
>
>
> builds/msvc/platform.hpp  added: #define HAVE_LIBSODIUM 1
>
>
>
> And also set the added these configuration options in the Visual Studio
> 2013 zeromq solution for the libzmq project;
>
>
>
> Set to ‘Release’ mode.
>
>
>
> C/C++ -> General-> Additional Include Directories ->
> C:\libsodium\src\libsodium\include
>
>
>
> Linker -> General -> Additional Library Directories ->
> C:\libsodium\bin\Win32\Release\v120\static  N.B. Also tried the \dynamic
> folder but without luck.
>
>
>
> Linker -> Input -> AdditionalDependencies -> libsodium.lib
>
>
>
> The zeromq build is now looking for the libsodium files but gives the
> build errors:
>
>
>
> Error      4              error LNK1120: 3 unresolved externals
> C:\zeromq-4.0.4\bin\Win32\libzmq.dll   libzmq
>
> Error      2              error LNK2001: unresolved external symbol
> "public: __thiscall zmq::curve_client_t::curve_client_t(struct
> zmq::options_t const &)" (??0curve_client_t at zmq@@QAE at ABUoptions_t@1@@Z)
> C:\zeromq-4.0.4\builds\msvc\libzmq\stream_engine.obj    libzmq
>
> Error      1              error LNK2001: unresolved external symbol
> "public: __thiscall zmq::curve_server_t::curve_server_t(class
> zmq::session_base_t *,class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> > const &,struct
> zmq::options_t const &)" (??0curve_server_t at zmq@@QAE at PAVsession_base_t
> @1 at ABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@
> @ABUoptions_t at 1@@Z)
> C:\zeromq-4.0.4\builds\msvc\libzmq\stream_engine.obj    libzmq
>
> Error      3              error LNK2001: unresolved external symbol
> __imp__crypto_box_keypair
> C:\zeromq-4.0.4\builds\msvc\libzmq\zmq_utils.obj               libzmq
>
>
>
>
>
> I’m not really sure of which build options to set there is the choice of:
>  Debug, Release, Static Debug, Static Release, WithOpenPGM in the zeromq
> build and then the dynamic, static or ltcg folders to link against in the
> libsodium structure.  I’ve tried various options which seem sensible but am
> really just pressing the buttons without understanding the implications of
> the differences!
>
>
>
> Anyone have any further suggestions?
>
>
>
> Thanks,
>
>
>
> Riskybiz.
>
>
>
> P.S. I’ve also considered the suggested options at
> http://lists.zeromq.org/pipermail/zeromq-dev/2014-November/027804.html
> but am unable to find any project or solution configuration setting
> relating to;
>
>
>
> (1) Properties->Configuration Properties->ZMQ Options->sodium->Enable
>
> Sodium value to 'No'
>
> (2) Properties->Configuration Properties->Local
>
> Dependencies->libsodium->Linkage to 'Not Linked'
>
>
>
> _______________________________________________
> 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/20141214/4ee79454/attachment.htm>


More information about the zeromq-dev mailing list