[zeromq-dev] zcertstore_insert: Assertion 'rc == 0' failed.
Arnaud Kapp
kapp.arno at gmail.com
Mon Mar 9 14:36:53 CET 2015
This is just a guess, but since you're saying that it works on an
other machine, it may be correct.
Did you compile libzmq with libsodium support?
On Mon, Mar 9, 2015 at 2:20 PM, Bachmair Florian - flexSolution GmbH
<Florian.Bachmair at flexsolution.eu> wrote:
> I get this error "zcertstore_insert: Assertion 'rc == 0' failed."
>
>
>
> When I execute this code:
>
>
>
> #include "czmq.h"
>
> static int s_send(void *socket, char *string);
>
> static int s_sendmore(void *socket, char *string);
>
> int main(void) {
>
> puts("Publisher");
>
> zctx_t *context = zctx_new();
>
> zauth_t *auth = zauth_new(context);
>
> zauth_allow(auth, "127.0.0.1");
>
> assert(auth);
>
> puts("1");
>
> zauth_set_verbose(auth, true);
>
> zauth_configure_curve(auth, "*", ".curve");
>
> puts("2");
>
>
>
> zcert_t *server_cert = zcert_load(".curve/mycert.pvt");
>
> assert(server_cert);
>
> void *publisher = zsocket_new(context, ZMQ_PUB);
>
> zcert_apply(server_cert, publisher);
>
> zsocket_set_curve_server(publisher, 1);
>
>
>
> while (1) {
>
> s_sendmore(publisher, "A");
>
> s_send(publisher, "We don't want to see
> this");
>
> s_sendmore(publisher, "B");
>
> s_send(publisher, "We would like to see
> this");
>
> sleep(1);
>
> }
>
> zmq_close(publisher);
>
> zmq_ctx_destroy(context);
>
> puts("exit");
>
> return 0;
>
> }
>
> // Convert C string to 0MQ string and send to socket
>
> static int s_send(void *socket, char *string) {
>
> int size = zmq_send(socket, string, strlen(string), 0);
>
> return size;
>
> }
>
> // Sends string as 0MQ string, as multipart non-terminal
>
> static int s_sendmore(void *socket, char *string) {
>
> int size = zmq_send(socket, string, strlen(string),
> ZMQ_SNDMORE);
>
> return size;
>
> }
>
>
>
> I have compiled everything exactly like it is described in
> http://hintjens.com/blog:49#toc0
>
>
>
> The odd thing is that I had this code running on a other machine sucesfully.
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
--
Kapp Arnaud - Xaqq
More information about the zeromq-dev
mailing list