comparison src/proto.nacl0.c @ 6:cf9b44b46be5

Use stderr for output instead of stdout, added debugging code to nacltai
author root <root@Really.UFO-Net.nl>
date Fri, 08 Oct 2010 23:29:56 +0000
parents 65c01f57bdce
children dfac56805c77
comparison
equal deleted inserted replaced
5:9d449e899402 6:cf9b44b46be5
70 hex2bin(cpublickey, envval, crypto_box_PUBLICKEYBYTES); 70 hex2bin(cpublickey, envval, crypto_box_PUBLICKEYBYTES);
71 if (!(envval = getconf("PRIVATE_KEY"))) return errorexit("Missing PRIVATE_KEY"); 71 if (!(envval = getconf("PRIVATE_KEY"))) return errorexit("Missing PRIVATE_KEY");
72 if (strlen(envval) != 2*crypto_box_PUBLICKEYBYTES) return errorexit("PRIVATE_KEY length"); 72 if (strlen(envval) != 2*crypto_box_PUBLICKEYBYTES) return errorexit("PRIVATE_KEY length");
73 hex2bin(csecretkey, envval, crypto_box_SECRETKEYBYTES); 73 hex2bin(csecretkey, envval, crypto_box_SECRETKEYBYTES);
74 crypto_box_beforenm(d->cbefore, cpublickey, csecretkey); 74 crypto_box_beforenm(d->cbefore, cpublickey, csecretkey);
75 return 0;
75 } 76 }
76 77
77 #ifdef COMBINED_BINARY 78 #ifdef COMBINED_BINARY
78 int tunmain_nacl0() { 79 int tunmain_nacl0() {
79 #else 80 #else