From f95a3a159f373b00efaae1aafeca8bc46533901a Mon Sep 17 00:00:00 2001 From: Stuart D. Gathman Date: Oct 15 2016 01:07:40 +0000 Subject: Disable SUBNODE code when not used. Use libsodium by default. --- diff --git a/cjdns.sign.patch b/cjdns.sign.patch new file mode 100644 index 0000000..971f239 --- /dev/null +++ b/cjdns.sign.patch @@ -0,0 +1,36 @@ +diff -up ./crypto/Sign.c.sign ./crypto/Sign.c +--- ./crypto/Sign.c.sign 2016-10-13 21:41:54.994262245 -0400 ++++ ./crypto/Sign.c 2016-10-14 20:51:33.395789629 -0400 +@@ -13,6 +13,7 @@ + * along with this program. If not, see . + */ + ++#ifdef SUBNODE + #include "crypto/Sign.h" + + //#include "node_build/dependencies/cnacl/crypto_sign/ed25519/ref10/ge.h" +@@ -110,3 +111,6 @@ int Sign_publicSigningKeyToCurve25519(ui + + return 0; + } ++#else ++#pragma GCC diagnostic ignored "-Wpedantic" ++#endif // SUBNODE +diff -up ./crypto/test/Sign_test.c.sign ./crypto/test/Sign_test.c +--- ./crypto/test/Sign_test.c.sign 2016-10-14 20:29:19.334704236 -0400 ++++ ./crypto/test/Sign_test.c 2016-10-14 20:52:31.415488510 -0400 +@@ -23,6 +23,7 @@ + + int main() + { ++#ifdef SUBNODE + struct Allocator* alloc = MallocAllocator_new(1048576); + struct Log* logger = FileWriterLog_new(stdout, alloc); + struct Random* rand = Random_new(alloc, logger, NULL); +@@ -42,5 +43,6 @@ int main() + Assert_true(!Sign_verifyMsg(&signingKeyPair[32], msg)); + Assert_true(!Sign_publicSigningKeyToCurve25519(curve25519publicB, &signingKeyPair[32])); + Assert_true(!Bits_memcmp(curve25519publicB, curve25519public, 32)); ++#endif // SUBNODE + return 0; + }