]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
hookup experimental ed25519 signer 1998/head
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 25 Dec 2014 12:47:51 +0000 (13:47 +0100)
committermind04 <mind04@monshouwer.org>
Sat, 3 Jan 2015 12:16:44 +0000 (13:16 +0100)
.travis.yml
configure.ac
m4/pdns_enable_ed25519.m4 [new file with mode: 0644]
pdns/Makefile.am
pdns/ext/Makefile.am
pdns/ext/ed25519/.gitignore [new file with mode: 0644]
pdns/ext/ed25519/Makefile-ed25519 [moved from pdns/ext/ed25519/Makefile with 100% similarity]
pdns/ext/ed25519/Makefile.am [new file with mode: 0644]
pdns/version.cc

index f3c6f6e4d4ac987b59a9ea6427d38fc868449166..2e18ff74a9968a489e8c22d99add41035300ca8b 100644 (file)
@@ -75,6 +75,7 @@ script:
      --enable-unit-tests
      --enable-tools
      --enable-remotebackend-zeromq
+     --enable-experimental-ed25519
      --enable-experimental-pkcs11
      --disable-silent-rules
      --disable-dependency-tracking
index d43b6af4260c8ded96ff2bd4efb3325b86242136..52a04f662199623cf0e2040f13b032d941e7e89c 100644 (file)
@@ -174,6 +174,7 @@ PDNS_WITH_SYSTEM_POLARSSL
 PDNS_ENABLE_BOTAN
 PDNS_ENABLE_PKCS11
 PDNS_WITH_CRYPTOPP
+PDNS_ENABLE_ED25519
 PDNS_ENABLE_REMOTEBACKEND_ZEROMQ
 
 AC_MSG_CHECKING([whether we will be building static binaries])
@@ -341,6 +342,7 @@ AC_CONFIG_FILES([
   docs/Makefile
   pdns/pdns.init
   pdns/ext/Makefile
+  pdns/ext/ed25519/Makefile
   pdns/ext/yahttp/Makefile
   pdns/ext/yahttp/yahttp/Makefile
   pdns/ext/polarssl/Makefile
diff --git a/m4/pdns_enable_ed25519.m4 b/m4/pdns_enable_ed25519.m4
new file mode 100644 (file)
index 0000000..686f939
--- /dev/null
@@ -0,0 +1,22 @@
+AC_DEFUN([PDNS_ENABLE_ED25519], [
+  AC_MSG_CHECKING([whether we will be linking in Ed25519])
+  AC_ARG_ENABLE([experimental-ed25519],
+    AS_HELP_STRING([--enable-experimental-ed25519],
+      [use experimental Ed25519 @<:@default=no@:>@]),
+    [enable_ed25519=$enableval],
+    [enable_ed25519=no]
+  )
+  AC_MSG_RESULT([$enable_ed25519])
+
+  AM_CONDITIONAL([ED25519], [test "x$enable_ed25519" != "xno"])
+  AM_COND_IF([ED25519], [
+    ED25519_SUBDIR=ed25519
+    ED25519_LIBS="-L\$(top_builddir)/pdns/ext/$ED25519_SUBDIR/ -led25519"
+  ],[
+    ED25519_SUBDIR=
+    ED25519_LIBS=
+  ])
+
+  AC_SUBST(ED25519_SUBDIR)
+  AC_SUBST(ED25519_LIBS)
+])
index 0b0ee94c5f0b644b3547442a1aaaabd9d430343a..cd56c31a961efd46ae97a625603080a0a0349507 100644 (file)
@@ -202,6 +202,11 @@ pdns_server_SOURCES += cryptoppsigners.cc
 pdns_server_LDADD += $(CRYPTOPP_LIBS)
 endif
 
+if ED25519
+pdns_server_SOURCES += ed25519signers.cc
+pdns_server_LDADD += $(ED25519_LIBS)
+endif
+
 if SQLITE3
 pdns_server_SOURCES += ssqlite3.cc ssqlite3.hh
 pdns_server_LDADD += $(SQLITE3_LIBS)
@@ -291,6 +296,11 @@ pdnssec_SOURCES += cryptoppsigners.cc
 pdnssec_LDADD += -lcryptopp
 endif
 
+if ED25519
+pdnssec_SOURCES += ed25519signers.cc
+pdnssec_LDADD += $(ED25519_LIBS)
+endif
+
 if SQLITE3
 pdnssec_SOURCES += ssqlite3.cc ssqlite3.hh
 pdnssec_LDADD += $(SQLITE3_LIBS)
index 47432b7dbd3b17f4ac5a6e0df812439c08c07508..f30d5a3b263991226d2f5110f0669ac6f40c2366 100644 (file)
@@ -1,9 +1,11 @@
 SUBDIRS = \
        $(POLARSSL_SUBDIR) \
+       $(ED25519_SUBDIR) \
        yahttp \
        rapidjson
 
 DIST_SUBDIRS = \
        polarssl \
+       ed25519 \
        yahttp \
        rapidjson
diff --git a/pdns/ext/ed25519/.gitignore b/pdns/ext/ed25519/.gitignore
new file mode 100644 (file)
index 0000000..b336cc7
--- /dev/null
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/pdns/ext/ed25519/Makefile.am b/pdns/ext/ed25519/Makefile.am
new file mode 100644 (file)
index 0000000..e0c33be
--- /dev/null
@@ -0,0 +1,46 @@
+noinst_LTLIBRARIES = libed25519.la
+
+libed25519_la_SOURCES = \
+       fe_0.c \
+       fe_1.c \
+       fe_add.c \
+       fe_cmov.c \
+       fe_copy.c \
+       fe_frombytes.c \
+       fe_invert.c \
+       fe_isnegative.c \
+       fe_isnonzero.c \
+       fe_mul.c \
+       fe_neg.c \
+       fe_pow22523.c \
+       fe_sq2.c \
+       fe_sq.c \
+       fe_sub.c \
+       fe_tobytes.c \
+       ge_add.c \
+       ge_double_scalarmult.c \
+       ge_frombytes.c \
+       ge_madd.c \
+       ge_msub.c \
+       ge_p1p1_to_p2.c \
+       ge_p1p1_to_p3.c \
+       ge_p2_0.c \
+       ge_p2_dbl.c \
+       ge_p3_0.c \
+       ge_p3_dbl.c \
+       ge_p3_tobytes.c \
+       ge_p3_to_cached.c \
+       ge_p3_to_p2.c \
+       ge_precomp_0.c \
+       ge_scalarmult_base.c \
+       ge_sub.c \
+       ge_tobytes.c \
+       keypair.c \
+       open.c \
+       publickey.c \
+       sc_muladd.c \
+       sc_reduce.c \
+       sha512-blocks.c \
+       sha512-hash.c \
+       sign.c \
+       verify.c
index 4d2a5bce060cbe4fd599c1b76adbae476912ffd8..1b33d595cf8e68b435a5bcfa2e371c0656b54b1f 100644 (file)
@@ -88,6 +88,9 @@ void showBuildConfiguration()
 #ifdef HAVE_CRYPTOPP
     "cryptopp " <<
 #endif
+#ifdef HAVE_ED25519
+    "ed25519 " <<
+#endif
 #ifdef HAVE_LIBDL
     "libdl " <<
 #endif