aboutsummaryrefslogtreecommitdiff
path: root/rp
diff options
context:
space:
mode:
Diffstat (limited to 'rp')
-rwxr-xr-xrp/rcynic/rcynic-cron2
-rwxr-xr-xrp/rcynic/rcynic-html2
-rwxr-xr-xrp/rcynic/rcynic-svn2
-rwxr-xr-xrp/rcynic/rcynic-text2
-rw-r--r--rp/rcynic/rpki-torrent.py4
-rwxr-xr-xrp/rcynic/validation_status2
-rw-r--r--rp/utils/Makefile.in36
-rwxr-xr-xrp/utils/scan_routercerts (renamed from rp/utils/scan_routercerts.py)0
8 files changed, 40 insertions, 10 deletions
diff --git a/rp/rcynic/rcynic-cron b/rp/rcynic/rcynic-cron
index 4da1d5cd..73368e0d 100755
--- a/rp/rcynic/rcynic-cron
+++ b/rp/rcynic/rcynic-cron
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+#
# $Id$
#
# Copyright (C) 2014 Dragon Research Labs ("DRL")
diff --git a/rp/rcynic/rcynic-html b/rp/rcynic/rcynic-html
index 6070cd13..a7de2291 100755
--- a/rp/rcynic/rcynic-html
+++ b/rp/rcynic/rcynic-html
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+#
# $Id$
#
# Copyright (C) 2013--2014 Dragon Research Labs ("DRL")
diff --git a/rp/rcynic/rcynic-svn b/rp/rcynic/rcynic-svn
index fd0df500..c667ec4a 100755
--- a/rp/rcynic/rcynic-svn
+++ b/rp/rcynic/rcynic-svn
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+#
# $Id$
#
# Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
diff --git a/rp/rcynic/rcynic-text b/rp/rcynic/rcynic-text
index a8e56dac..c837e88b 100755
--- a/rp/rcynic/rcynic-text
+++ b/rp/rcynic/rcynic-text
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+#
# $Id$
#
# Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
diff --git a/rp/rcynic/rpki-torrent.py b/rp/rcynic/rpki-torrent.py
index 9b97f298..cc0798e7 100644
--- a/rp/rcynic/rpki-torrent.py
+++ b/rp/rcynic/rpki-torrent.py
@@ -1,5 +1,5 @@
-#!/usr/local/bin/python
-
+#!/usr/bin/env python
+#
# $Id$
#
# Copyright (C) 2013--2014 Dragon Research Labs ("DRL")
diff --git a/rp/rcynic/validation_status b/rp/rcynic/validation_status
index 1f7a704d..1ff17e75 100755
--- a/rp/rcynic/validation_status
+++ b/rp/rcynic/validation_status
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+#
# $Id$
#
# Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
diff --git a/rp/utils/Makefile.in b/rp/utils/Makefile.in
index 03c041a4..137230b4 100644
--- a/rp/utils/Makefile.in
+++ b/rp/utils/Makefile.in
@@ -25,22 +25,19 @@ BINS = find_roa hashdir print_rpki_manifest print_roa scan_roas uri
SCRIPTS = scan_routercerts
-all: ${BINS}
+all:: ${BINS}
-clean:
+clean::
rm -rf ${BINS} *.o *.dSYM
-test:
- @true
-
-install: all
+install:: all
if test -d ${DESTDIR}${bindir} ; then :; else ${INSTALL} -d ${DESTDIR}${bindir}; fi
${INSTALL} ${BINS} ${SCRIPTS} ${DESTDIR}${bindir}
-deinstall uninstall:
+deinstall uninstall::
for i in ${BINS} ${SCRIPTS}; do rm -f ${DESTDIR}${bindir}/$$i; done
-distclean: clean
+distclean:: clean
rm -f Makefile
find_roa: find_roa.c
@@ -60,3 +57,26 @@ scan_roas: scan_roas.c
uri: uri.c
${CC} ${CFLAGS} -o $@ uri.c ${LDFLAGS} ${LIBS}
+
+# Tests
+
+RSYNC_AUTH_DIR = ${abs_top_builddir}/rp/rcynic/rcynic-data/authenticated
+HASHDIR_OUTPUT = hashed-pem-dir
+TARGET_PREFIXES = 10.3.0.44 10.2.0.6 10.0.0.0/24
+
+test:: ${BINS} ${SCRIPTS}
+ if test -d ${RSYNC_AUTH_DIR}; \
+ then \
+ rm -rf ${HASHDIR_OUTPUT} ; \
+ mkdir ${HASHDIR_OUTPUT} ; \
+ ./hashdir ${RSYNC_AUTH_DIR} ${HASHDIR_OUTPUT}; \
+ ./find_roa ${RSYNC_AUTH_DIR} ${TARGET_PREFIXES} ; \
+ date -u +'now: %Y%m%d%H%M%SZ' || : ; \
+ find ${RSYNC_AUTH_DIR} -type f -name '*.roa' -print -exec ./print_roa {} \; ; \
+ find ${RSYNC_AUTH_DIR} -type f -name '*.mft' -print -exec ./print_rpki_manifest {} \; ; \
+ ./scan_roas ${RSYNC_AUTH_DIR} ; \
+ ./scan_routercerts ${RSYNC_AUTH_DIR} ; \
+ fi
+
+clean::
+ rm -rf ${HASHDIR_OUTPUT}
diff --git a/rp/utils/scan_routercerts.py b/rp/utils/scan_routercerts
index 342fa272..342fa272 100755
--- a/rp/utils/scan_routercerts.py
+++ b/rp/utils/scan_routercerts