zeromq / clrzmq4

ZeroMQ C# namespace (.NET and mono, Windows, Linux and MacOSX, x86 and amd64)
GNU Lesser General Public License v3.0
237 stars 112 forks source link

Cannot get Ironhouse ZGuideExample to work #185

Open rlt3 opened 4 years ago

rlt3 commented 4 years ago

On Ubuntu I cloned this repository and compiled using mono with msbuild clrzmq4.mono.sln /p:Configuration=Release and then ran the Ironhouse client and server like mono bin/Release/ZGuideExamples.exe IronhouseServer and mono bin/Release/ZGuideExamples.exe IronhouseClient.

The output of the server is simply:

I: Sunday, October 20, 2019 ZAuth: zauth: API command=ALLOW
I: Sunday, October 20, 2019 ZAuth: zauth: - whitelisting ipaddress=127.0.0.1
I: Sunday, October 20, 2019 ZAuth: zauth: API command=CURVE
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?

With the 'wrong server key?' repeating indefinitely. I then modified both the server and client to simply output the server cert's public and secret txt just to make sure the client and server were using the same values.

The code I introduced:

Console.WriteLine("Server Public = {0}", serverCert.PublicTxt);
Console.WriteLine("Server Secret = {0}", serverCert.SecretTxt);

What I got as output when running the server only:

Server Public = 0000000000<Rv$0000000rr910000:0000000000
Server Secret = 0000000000<Rv$0000000rr910000:0000000000
I: Sunday, October 20, 2019 ZAuth: zauth: API command=ALLOW
I: Sunday, October 20, 2019 ZAuth: zauth: - whitelisting ipaddress=127.0.0.1
I: Sunday, October 20, 2019 ZAuth: zauth: API command=CURVE

The public and secret keys are the same which is probably incorrect. The same keys are output for the client as well. Removing the ".curve" directory doesn't seem to force a regeneration of the keys and the same values get ouput.