diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/Makefile.am | 14 | ||||
-rw-r--r-- | src/common/util.c | 7 | ||||
-rw-r--r-- | src/common/util.h | 2 |
3 files changed, 23 insertions, 0 deletions
diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 105c413343..78c8ab5516 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -1,6 +1,8 @@ noinst_LIBRARIES = libor.a libor-crypto.a +EXTRA_DIST = common_sha1.i + #CFLAGS = -Wall -Wpointer-arith -O2 if USE_OPENBSD_MALLOC @@ -14,3 +16,15 @@ libor_a_SOURCES = address.c log.c util.c compat.c container.c mempool.c \ libor_crypto_a_SOURCES = crypto.c aes.c tortls.c torgzip.c noinst_HEADERS = address.h log.h crypto.h test.h util.h compat.h aes.h torint.h tortls.h strlcpy.c strlcat.c torgzip.h container.h ht.h mempool.h memarea.h ciphers.inc + +common_sha1.i: $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS) + if test "@SHA1SUM@" != none; then \ + @SHA1SUM@ $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS) | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > common_sha1.i; \ + elif test "@OPENSSL@" != none; then \ + @OPENSSL@ sha1 $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS) | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > common_sha1.i; \ + else \ + rm common_sha1.i; \ + touch common_sha1.i; \ + fi + +util.o: common_sha1.i diff --git a/src/common/util.c b/src/common/util.c index 6310811961..bb227e4b0c 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -2562,3 +2562,10 @@ write_pidfile(char *filename) } } +const char * +libor_get_digests(void) +{ + return "" +#include "common_sha1.i" + ; +} diff --git a/src/common/util.h b/src/common/util.h index cbf5334c15..363a23b661 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -294,5 +294,7 @@ void start_daemon(void); void finish_daemon(const char *desired_cwd); void write_pidfile(char *filename); +const char *libor_get_digests(void); + #endif |