Coder Social home page Coder Social logo

Comments (8)

metadings avatar metadings commented on June 11, 2024

TL;DR: You can happily replace the files, preferrably using new files, in folders i386 and amd64, so to say libzmq.dll and libsodium.dll, also their corresponding .so files.


Well no... Actually I don't have a Windows machine, so I can't make you a new build of libzmq and libsodium... (which I thought I did make with libsodium and libpgm...)

Reverting the update means you get a lot older version of libzmq which is, let's face it: bullshit.

I've made the update, to just have one and I've used .NET 4.0 and VC2010 to run this application on every computer on this earth.

However, you are using VS2015 (latest ... ;)), you may also try to build the C project using VS2012...? I'm not really sure about wich runtime I should support; you may deside so.

Then you fork github.com/zeromq/clrzmq4, so you have github.com/amonamarth/clrzmq4...
Then do git clone https://github.com/amonamarth/clrzmq4.
Do change the files libzmq.dll and libsodium.dll in folders i386 and amd64.
Finally, you can git push origin master and send me a "Pull Request" to let me import (git pull) your changes.

from clrzmq4.

metadings avatar metadings commented on June 11, 2024

I'm going to tell you: open your Visual Studio, or MonoDevelop, open the project ZeroMQ/clrzmq4 and build the Project... So to say, you do open ZeroMQ/libzmq (@hintjens), also jedisct1/libsodium (@jedisct1), and possibly also steve-o/openpgm (@steve-o), and build their projects!

from clrzmq4.

amonamarth avatar amonamarth commented on June 11, 2024

Maybe I came across as a bit rude, and in that case I'm sorry. I have never contributed to an open source project (I actually created this account just to be able to open an issue here). I wasn't even sure if opening an issue was the right choice, or if it would be better to just make a comment on the commit Updating v4.1 with curve, epgm (Windows).

I did "happily" build and replace the dll:s, and they worked for my use case. However, I am not comfortable with forking and committing the dll:s, since I don't have much experience with this and probably made some silly mistake or an error (for example, I didn't even think about the different Visual Studio runtimes). This is the reason I created a new issue; to make sure this is known if someone else has the same problem, and maybe someone with more experience and knowledge would be able to fix it properly.

I have actually been very nervous about even trying to contribute in any way to a project like this, since I fear the response would be hostile.

from clrzmq4.

metadings avatar metadings commented on June 11, 2024

TL;DR: Well no... You are not rude! You didn't say things like "f_ck" or "assh_le"... You said something about new ZSocket, new ZFrame and the like :-) You are welcome!


Well no, I am a one-man-show running some github.com/zeromq/clrzmq4, this is about new ZSocket and new ZFrame... I believe I'm looking like the big-ZeroMQ-ZGuide-things and there; look: it's running on C#! :-)

So no, I am a one-man-show, sometimes doing

// amd64/libzmq.dll, amd64/libsodium.dll
// i386/libzmq.dll, i386/libsodium.dll
// ... changed
git add -A
git commit -m "Updating v4.1 with curve, epgm (Windows)" 
git push zeromq master

from clrzmq4.

amonamarth avatar amonamarth commented on June 11, 2024

Thanks, I needed that :)
Anyways, I found an issue on libzmq regarding the build problem I had with libzmq and libsodium; when it is resolved, I (or someone else I guess :) ) could build the new DLL:s and commit them to a fork of clrzmq4. I'd like to at least see what people have to say about how to resolve the issue in libzmq before I try to build them again (e.g. if I overlooked some important detail when building my current DLL:s) :-)

Also, I would like to show some code, since my previous explanation perhaps was a little unclear.
This code is a short example of what I was trying to do, but it failed.

    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                byte[] publicKey;
                byte[] privateKey;
                ZeroMQ.Z85.CurveKeypair(out publicKey, out privateKey);  // <-- throws an System.InvalidOperationException

                Console.WriteLine("public key:\n"+BitConverter.ToString(publicKey));
                Console.WriteLine("private key:\n" + BitConverter.ToString(privateKey));
            }
            catch(Exception e)
            {
                int errnum = ZeroMQ.lib.zmq.errno(); // Returns 127 (ENOTSUP), set by zmq_curve_keypair if libzmq was not built with curve support (i.e. using libsodium)
                String errstr = Marshal.PtrToStringAnsi(ZeroMQ.lib.zmq.strerror(errnum)); // Just says "Not supported"
                Console.WriteLine("errno (" + errnum + "): " + errstr);
                Console.WriteLine(e);
            }     
        }
    }

It fails because libzmq.dll was built without support for curve (which is implemented with libsodium I think?). This is because of the build problem in libzmq I mentioned earlier (it seems to affect at least VS2012 and VS2015), not because of a problem in clrzmq4 (maybe I shouldn't have created an issue here?).

Other code that has nothing to do with curve works fine. For example, implementing the grasslands pattern (translated to C# of course :) ) works perfectly.

Also, I want to thank you for your work with the binding, because it is really useful :)

from clrzmq4.

metadings avatar metadings commented on June 11, 2024

I want to thank you for your work with the binding, because it is really useful :)

YEAH 👍

Well, I don't have a Windows computer to test, nor do I have a test suite, I'm just running ./ZGuideExamples.exe Espresso to check some features. I have to admit, I didn't check any of the curve features.

You should make a new libzmq.dll, with libsodium.dll and using libpgm.lib, for VS2012 to which also Mozilla has changed recently, and then git that to me...
I'm also not that hard in C/C++, so please don't be too shy to do this :-)

However, if you already installed VS2015, and there may/will be no way to install VS2010 or VS2012; maybe you can use msbuild to get the target right - but I don't want to overrun you with the Setup and Installation mess. So to say, wait for someone to build that thing, and stay tuned!

from clrzmq4.

kramerids avatar kramerids commented on June 11, 2024

I'm having the same issue as described above in the original question. I'm trying to use the Curve security features of libsodium but haven't been able to get it to work. Will there be an update to the project that includes the sodium enable libzmq in the near future?

If not can someone provide detailed instructions on how to build a portable version of the libraries with sodium enabled?

Looking for any guidance I can get to do this correctly.

from clrzmq4.

metadings avatar metadings commented on June 11, 2024

Will there be an update to the project that includes the sodium enable libzmq in the near future?

Yes, I'm going to push NuGet/ZeroMQ v4.1.0.22 - with the older version of libzmq v4.1.x, just to have zmq_curve_keypair back.

Please continue this discussion in Issue #70.

from clrzmq4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.