diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | test/catlfish-test-local-signing.cfg | 6 |
2 files changed, 10 insertions, 0 deletions
@@ -2,6 +2,7 @@ PREFIX=. INSTDIR=$(PREFIX)/catlfish +SOFTHSM=/usr/local/bin/softhsm2-util build all: ./make.erl @@ -23,6 +24,7 @@ tests-prepare: make tests-createcert mkdir $(INSTDIR)/tests/keys (cd $(INSTDIR)/tests/keys ; ../../../tools/create-key.sh logkey) + openssl pkcs8 -topk8 -nocrypt -in $(INSTDIR)/tests/keys/logkey-private.pem -out $(INSTDIR)/tests/keys/logkey-private.pkcs8 mkdir $(INSTDIR)/tests/mergedb mkdir $(INSTDIR)/tests/mergedb/chains touch $(INSTDIR)/tests/mergedb/logorder @@ -44,6 +46,8 @@ tests-prepare: done (cd $(INSTDIR)/tests/privatekeys ; ../../../tools/create-key.sh merge-1) mv $(INSTDIR)/tests/privatekeys/merge-1.pem $(INSTDIR)/tests/publickeys/ + -test -x $(SOFTHSM) && $(SOFTHSM) --init-token --slot=0 --label=mylabel --so-pin=ffff --pin=ffff + -test -x $(SOFTHSM) && $(SOFTHSM) --import $(INSTDIR)/tests/keys/logkey-private.pkcs8 --slot 0 --label mylabel --pin ffff --id 00 tests-start: @for node in $(NODES); do \ diff --git a/test/catlfish-test-local-signing.cfg b/test/catlfish-test-local-signing.cfg index c8b27ae..a48b2d4 100644 --- a/test/catlfish-test-local-signing.cfg +++ b/test/catlfish-test-local-signing.cfg @@ -13,3 +13,9 @@ paths: logpublickey: tests/keys/logkey.pem logprivatekey: tests/keys/logkey-private.pem privatekeys: tests/privatekeys + +#hsm: +# library: /usr/local/lib/softhsm/libsofthsm2.so +# slot: 0 +# label: mylabel +# pin: ffff |