diff src/proto.nacltai.c @ 19:3400045a57b8 V2.1.6

Version 2.1.6, changed sourcecode archive generation, use NaCl version 20110221, do not duplicate NaCl sourcecode, support iproute2 for persistent tunnel creation on Debian, support running as root on Debian, removed autogenerated header files
author Ivo Smits <Ivo@UCIS.nl>
date Sun, 27 Feb 2011 22:42:27 +0100
parents 5be1ecb80cc9
children 38d495566d1c
line wrap: on
line diff
--- a/src/proto.nacltai.c	Sun Feb 27 20:55:05 2011 +0100
+++ b/src/proto.nacltai.c	Sun Feb 27 22:42:27 2011 +0100
@@ -25,6 +25,7 @@
 
 #include "common.c"
 #include "crypto_box.h"
+#include "crypto_scalarmult_curve25519.h"
 #include <sys/types.h>
 #include <sys/time.h>
 
@@ -116,8 +117,6 @@
   t->atto = 0;
 }
 
-extern crypto_scalarmult_curve25519_base(unsigned char *pk, unsigned char *sk);
-
 static int encode(struct qtsession* sess, char* raw, char* enc, int len) {
 //	fprintf(stderr, "Encoding packet of %d bytes from %d to %d\n", len, raw, enc);
 	struct qt_proto_data_nacltai* d = (struct qt_proto_data_nacltai*)sess->protocol_data;
@@ -172,8 +171,7 @@
 	memset(d->cenonce, 0, crypto_box_NONCEBYTES);
 	memset(d->cdnonce, 0, crypto_box_NONCEBYTES);
 
-	const unsigned char base[32] = {9};
-	crypto_scalarmult(cownpublickey, csecretkey, base);
+	crypto_scalarmult_curve25519_base(cownpublickey, csecretkey);
 
 	if (envval = getenv("TIME_WINDOW")) {
 		taia_now(&d->cdtaip);