[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Move consttime library code into its own directory.
commit a403ee6bb31168e19cf4173fff0e9acf9548231f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Jun 21 10:53:29 2018 -0400
Move consttime library code into its own directory.
---
.gitignore | 2 ++
Makefile.am | 4 ++--
src/common/include.am | 23 -----------------------
src/include.am | 1 +
src/{common => lib/ctime}/di_ops.c | 0
src/{common => lib/ctime}/di_ops.h | 0
src/lib/ctime/include.am | 25 +++++++++++++++++++++++++
src/rust/build.rs | 3 +--
8 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/.gitignore b/.gitignore
index 517022399..6eb9530a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -167,6 +167,8 @@ uptime-*.json
/src/ext/keccak-tiny/libkeccak-tiny.lib
# /src/lib
+/src/lib/libtor-ctime.a
+/src/lib/libtor-ctime-testing.a
/src/lib/libtor-err.a
/src/lib/libtor-err-testing.a
diff --git a/Makefile.am b/Makefile.am
index 6c60de111..40ecfdae7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,14 +41,14 @@ endif
TOR_UTIL_LIBS = \
src/common/libor.a \
src/lib/libtor-err.a \
- src/common/libor-ctime.a
+ src/lib/libtor-ctime.a
# Variants of the above for linking the testing variant of tor (for coverage
# and tests)
TOR_UTIL_TESTING_LIBS = \
src/common/libor-testing.a \
src/lib/libtor-err-testing.a \
- src/common/libor-ctime-testing.a
+ src/lib/libtor-ctime-testing.a
# Internal crypto libraries used in Tor
TOR_CRYPTO_LIBS = \
diff --git a/src/common/include.am b/src/common/include.am
index 533703486..fa12888ac 100644
--- a/src/common/include.am
+++ b/src/common/include.am
@@ -1,14 +1,12 @@
noinst_LIBRARIES += \
src/common/libor.a \
- src/common/libor-ctime.a \
src/common/libor-crypto.a \
src/common/libor-event.a
if UNITTESTS_ENABLED
noinst_LIBRARIES += \
src/common/libor-testing.a \
- src/common/libor-ctime-testing.a \
src/common/libor-crypto-testing.a \
src/common/libor-event-testing.a
endif
@@ -59,26 +57,6 @@ else
readpassphrase_source=
endif
-if ADD_MULODI4
-mulodi4_source=src/ext/mulodi/mulodi4.c
-else
-mulodi4_source=
-endif
-
-LIBOR_CTIME_A_SRC = \
- $(mulodi4_source) \
- src/ext/csiphash.c \
- src/common/di_ops.c
-
-src_common_libor_ctime_a_SOURCES = $(LIBOR_CTIME_A_SRC)
-if UNITTESTS_ENABLED
-src_common_libor_ctime_testing_a_SOURCES = $(LIBOR_CTIME_A_SRC)
-else
-src_common_libor_ctime_testing_a_SOURCES =
-endif
-src_common_libor_ctime_a_CFLAGS = @CFLAGS_CONSTTIME@
-src_common_libor_ctime_testing_a_CFLAGS = @CFLAGS_CONSTTIME@ $(TEST_CFLAGS)
-
LIBOR_A_SRC = \
src/common/address.c \
src/common/address_set.c \
@@ -189,7 +167,6 @@ COMMONHEADERS = \
src/common/crypto_rsa.h \
src/common/crypto_s2k.h \
src/common/crypto_util.h \
- src/common/di_ops.h \
src/common/handles.h \
src/common/memarea.h \
src/common/linux_syscalls.inc \
diff --git a/src/include.am b/src/include.am
index 424481485..296ac19b1 100644
--- a/src/include.am
+++ b/src/include.am
@@ -1,5 +1,6 @@
include src/ext/include.am
include src/lib/err/include.am
+include src/lib/ctime/include.am
include src/common/include.am
include src/trunnel/include.am
include src/or/include.am
diff --git a/src/common/di_ops.c b/src/lib/ctime/di_ops.c
similarity index 100%
rename from src/common/di_ops.c
rename to src/lib/ctime/di_ops.c
diff --git a/src/common/di_ops.h b/src/lib/ctime/di_ops.h
similarity index 100%
rename from src/common/di_ops.h
rename to src/lib/ctime/di_ops.h
diff --git a/src/lib/ctime/include.am b/src/lib/ctime/include.am
new file mode 100644
index 000000000..b46c43ba0
--- /dev/null
+++ b/src/lib/ctime/include.am
@@ -0,0 +1,25 @@
+
+noinst_LIBRARIES += src/lib/libtor-ctime.a
+
+if UNITTESTS_ENABLED
+noinst_LIBRARIES += src/lib/libtor-ctime-testing.a
+endif
+
+if ADD_MULODI4
+mulodi4_source=src/ext/mulodi/mulodi4.c
+else
+mulodi4_source=
+endif
+
+src_lib_libtor_ctime_a_SOURCES = \
+ $(mulodi4_source) \
+ src/ext/csiphash.c \
+ src/lib/ctime/di_ops.c
+
+src_lib_libtor_ctime_testing_a_SOURCES = \
+ $(src_lib_libtor_ctime_a_SOURCES)
+src_lib_libtor_ctime_a_CFLAGS = @CFLAGS_CONSTTIME@
+src_lib_libtor_ctime_testing_a_CFLAGS = @CFLAGS_CONSTTIME@ $(TEST_CFLAGS)
+
+noinst_HEADERS += \
+ src/lib/ctime/di_ops.h
diff --git a/src/rust/build.rs b/src/rust/build.rs
index 32000b12f..f9b40689f 100644
--- a/src/rust/build.rs
+++ b/src/rust/build.rs
@@ -150,11 +150,10 @@ pub fn main() {
// tor uses. We must be careful with factoring and dependencies
// moving forward!
cfg.component("or-crypto-testing");
- cfg.component("or-ctime-testing");
cfg.component("or-testing");
cfg.component("tor-err-testing");
cfg.component("or-event-testing");
- cfg.component("or-ctime-testing");
+ cfg.component("tor-ctime-testing");
cfg.component("curve25519_donna");
cfg.component("keccak-tiny");
cfg.component("ed25519_ref10");
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits