From 1292f337f3b4ede00c7ad3b327e953ae256f44bd Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 12 Jun 2019 00:13:18 +0200 Subject: restructure things a bit bc nice --- src/tests/Makefile | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/tests/Makefile') diff --git a/src/tests/Makefile b/src/tests/Makefile index 94b8790..9d83a7e 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -11,15 +11,10 @@ SOFTHSM_PROVIDER = /usr/lib/softhsm/libsofthsm2.so P11P_PROVIDER = /home/linus/usr/lib/pkcs11/p11-kit-client.so p11p-softhsm: testsig.hsm.p11p.pem - ( \ - P11_ENV=$$(p11-kit server $(SOFTHSM_PROVIDER)); \ - eval "$$P11_ENV"; \ - ./do-verify.sh ./openssl.p11p.cnf $(P11P_PROVIDER) $< "$(TEXT)"; \ - p11-kit server --kill > /dev/null; \ - ) + echo "$(TEXT)" |./do-verify.sh $< $(P11P_PROVIDER) ./openssl.p11p.cnf $(SOFTHSM_PROVIDER) direct-softhsm: testsig.hsm.pem - ./do-verify.sh ./openssl.direct.cnf $(SOFTHSM_PROVIDER) $< "$(TEXT)" + echo "$(TEXT)" | ./do-verify.sh $< $(SOFTHSM_PROVIDER) ./openssl.direct.cnf softhsm-token-setup: softhsm-token-setup.stamp softhsm-token-setup.stamp: softhsm/tokens testkey.pkcs8 @@ -43,18 +38,13 @@ testkey.pem: openssl genrsa -out $@ 2048 testsig.local.pem: testkey.pem - echo $(TEXT) | openssl dgst -sha256 -sign testkey.pem -out $@ + echo "$(TEXT)" | openssl dgst -sha256 -sign testkey.pem -out $@ testsig.hsm.pem: softhsm-token-setup - ./do-sign.sh ./openssl.direct.cnf $(SOFTHSM_PROVIDER) $@ "$(TEXT)" + echo "$(TEXT)" | ./do-sign.sh $@ $(SOFTHSM_PROVIDER) ./openssl.direct.cnf testsig.hsm.p11p.pem: softhsm-token-setup - ( \ - P11_ENV=$$(p11-kit server $(SOFTHSM_PROVIDER)); \ - eval "$$P11_ENV"; \ - ./do-sign.sh ./openssl.p11p.cnf $(P11P_PROVIDER) $@ "$(TEXT)"; \ - p11-kit server --kill > /dev/null; \ - ) + echo "$(TEXT)" | ./do-sign.sh $@ $(P11P_PROVIDER) ./openssl.p11p.cnf $(SOFTHSM_PROVIDER) server-running: # FIXME: use env printed to do 'p11-kit server --kill', at some point -- cgit v1.1