From 1f9535763a3a5c49728c375988a83897fad48142 Mon Sep 17 00:00:00 2001 From: Magnus Ahltorp Date: Tue, 31 Mar 2015 16:49:53 +0200 Subject: Generate test authentication keys dynamically --- Makefile | 8 ++++++-- test/config/privatekeys/frontend-1-private.pem | 5 ----- test/config/privatekeys/merge-1-private.pem | 5 ----- test/config/privatekeys/signing-1-private.pem | 5 ----- test/config/privatekeys/storage-1-private.pem | 5 ----- test/config/publickeys/frontend-1.pem | 4 ---- test/config/publickeys/merge-1.pem | 4 ---- test/config/publickeys/signing-1.pem | 4 ---- test/config/publickeys/storage-1.pem | 4 ---- 9 files changed, 6 insertions(+), 38 deletions(-) delete mode 100644 test/config/privatekeys/frontend-1-private.pem delete mode 100644 test/config/privatekeys/merge-1-private.pem delete mode 100644 test/config/privatekeys/signing-1-private.pem delete mode 100644 test/config/privatekeys/storage-1-private.pem delete mode 100644 test/config/publickeys/frontend-1.pem delete mode 100644 test/config/publickeys/merge-1.pem delete mode 100644 test/config/publickeys/signing-1.pem delete mode 100644 test/config/publickeys/storage-1.pem diff --git a/Makefile b/Makefile index bda7f3a..51fd786 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,6 @@ tests-prepare: touch $(PREFIX)/tests/mergedb/logorder mkdir $(PREFIX)/tests/known_roots cp tools/testcerts/roots/* $(PREFIX)/tests/known_roots - cp -r test/config/privatekeys $(PREFIX)/tests - cp -r test/config/publickeys $(PREFIX)/tests @for machine in $(MACHINES); do \ (cd $(PREFIX); ../tools/compileconfig.py --config=../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-$$machine.cfg) ; \ mkdir -p $(PREFIX)/tests/machine/machine-$$machine/db ; \ @@ -33,9 +31,15 @@ tests-prepare: touch $(PREFIX)/tests/machine/machine-$$machine/db/newentries ; \ done (cd $(PREFIX); ../tools/compileconfig.py --config=../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-signing.cfg) + mkdir $(PREFIX)/tests/privatekeys + mkdir $(PREFIX)/tests/publickeys @for node in $(NODES); do \ + (cd $(PREFIX)/tests/privatekeys ; ../../../tools/create-key.sh $$node) ; \ + mv $(PREFIX)/tests/privatekeys/$$node.pem $(PREFIX)/tests/publickeys/ ; \ mkdir -p test/nodes/$$node/log ; \ done + (cd $(PREFIX)/tests/privatekeys ; ../../../tools/create-key.sh merge-1) + mv $(PREFIX)/tests/privatekeys/merge-1.pem $(PREFIX)/tests/publickeys/ tests-start: @for node in $(NODES); do \ diff --git a/test/config/privatekeys/frontend-1-private.pem b/test/config/privatekeys/frontend-1-private.pem deleted file mode 100644 index 718efda..0000000 --- a/test/config/privatekeys/frontend-1-private.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIPER9WFIxLXvXDHTwPvGnNvBAKOB+/6ahpvuCjtlzOU8oAoGCCqGSM49 -AwEHoUQDQgAEibeLqrVV7QAE6Wytzpxi4sd0JtGNGRfXNZ9r9CNIVudDnNjtFRF5 -gwm/AxUWEuBXjnbVvq4HOLqZ0bP2qc+uRQ== ------END EC PRIVATE KEY----- diff --git a/test/config/privatekeys/merge-1-private.pem b/test/config/privatekeys/merge-1-private.pem deleted file mode 100644 index 55d50b1..0000000 --- a/test/config/privatekeys/merge-1-private.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIBQcXtOVX29dno+aYqGddVOpg23FfhJmrMFOpOegyYZxoAoGCCqGSM49 -AwEHoUQDQgAExHAsjFFgKFlrcCveHhVdjE7A/Uh0gXdAeN9+P7SDGgRNe0WWDjCr -0Da3c8X5JulA1cOLlQ0h2B67Yp3WZ9ONHg== ------END EC PRIVATE KEY----- diff --git a/test/config/privatekeys/signing-1-private.pem b/test/config/privatekeys/signing-1-private.pem deleted file mode 100644 index 0c9f1ac..0000000 --- a/test/config/privatekeys/signing-1-private.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEICQ+kchWtj3ZwGhzz+QkKl/CM0fsfQCDtI+1Cb3GID+moAoGCCqGSM49 -AwEHoUQDQgAEeVsqn8x1CWv4BK9+o6qQqVt+lQ7+dI6VoiwwNOT2CAvocdYHzzqW -2/dstQZIiYSdUw1SWQMR+7fTTRDZh5bDoQ== ------END EC PRIVATE KEY----- diff --git a/test/config/privatekeys/storage-1-private.pem b/test/config/privatekeys/storage-1-private.pem deleted file mode 100644 index b68d2a9..0000000 --- a/test/config/privatekeys/storage-1-private.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIAjVa6lTbhiNUfrfTGELRXqHSHF0nuk13lKF8NSHzU07oAoGCCqGSM49 -AwEHoUQDQgAE1vFWiMT9PItJGvyhMKPF5TnFirHPSh5u5swetajmNLyClWIDGXql -RlXlcPwuKxTISI4rFJATBkKhNjvSZ5L3oA== ------END EC PRIVATE KEY----- diff --git a/test/config/publickeys/frontend-1.pem b/test/config/publickeys/frontend-1.pem deleted file mode 100644 index 938ef29..0000000 --- a/test/config/publickeys/frontend-1.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEibeLqrVV7QAE6Wytzpxi4sd0JtGN -GRfXNZ9r9CNIVudDnNjtFRF5gwm/AxUWEuBXjnbVvq4HOLqZ0bP2qc+uRQ== ------END PUBLIC KEY----- diff --git a/test/config/publickeys/merge-1.pem b/test/config/publickeys/merge-1.pem deleted file mode 100644 index 95a75f7..0000000 --- a/test/config/publickeys/merge-1.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExHAsjFFgKFlrcCveHhVdjE7A/Uh0 -gXdAeN9+P7SDGgRNe0WWDjCr0Da3c8X5JulA1cOLlQ0h2B67Yp3WZ9ONHg== ------END PUBLIC KEY----- diff --git a/test/config/publickeys/signing-1.pem b/test/config/publickeys/signing-1.pem deleted file mode 100644 index cc5f472..0000000 --- a/test/config/publickeys/signing-1.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeVsqn8x1CWv4BK9+o6qQqVt+lQ7+ -dI6VoiwwNOT2CAvocdYHzzqW2/dstQZIiYSdUw1SWQMR+7fTTRDZh5bDoQ== ------END PUBLIC KEY----- diff --git a/test/config/publickeys/storage-1.pem b/test/config/publickeys/storage-1.pem deleted file mode 100644 index 0b862a1..0000000 --- a/test/config/publickeys/storage-1.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1vFWiMT9PItJGvyhMKPF5TnFirHP -Sh5u5swetajmNLyClWIDGXqlRlXlcPwuKxTISI4rFJATBkKhNjvSZ5L3oA== ------END PUBLIC KEY----- -- cgit v1.1