diff options
author | Rob Austein <sra@hactrn.net> | 2016-05-17 23:07:20 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-05-17 23:07:20 -0400 |
commit | 00b2adefccab211bb853c79ac84315dbd40ee05d (patch) | |
tree | bc457ed45e3e8aa559f7ea56b7d71374287d18a8 /GNUmakefile | |
parent | 80e44723c6569d922c8ffbf47661a788b53aaa1c (diff) |
Bugfixes to new error handling code, refactor some unreadable nested logic in handle lookup code.
The mapping between PKCS #11 objects and libhal handles isn't quite
right yet. This is a snapshot of bugfixes accumulated along the way,
before refactoring mapping code to deal with the underlying problem.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile index 4a7df7c..dc41be5 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -140,16 +140,17 @@ ifneq "${HSMBULLY}" "" bully: all set -x; \ sudo rm -f ${HSMBULLY_DATABASE} ${HSMBULLY_DATABASE}-journal ${HSMBULLY_KS_CLIENT} ${HSMBULLY_KS_SERVER}; \ - if test -x ${HSMBULLY_SERVER_BIN}; \ + if test -x '${HSMBULLY_SERVER_BIN}'; \ then \ sudo CRYPTECH_KEYSTORE=${HSMBULLY_KS_SERVER} ${HSMBULLY_SERVER_BIN} & \ pid=$$!; \ - fi; \ - (echo fnord; echo fnord) | sudo ./p11util --set-so-pin --set-user-pin --pin-from-stdin; \ - sudo PKCS11_DATABASE=${HSMBULLY_DATABASE} CRYPTECH_KEYSTORE=${HSMBULLY_KS_CLIENT} ${HSMBULLY} ${HSMBULLY_OPTIONS}; \ - if test -x ${HSMBULLY_SERVER_BIN}; \ - then \ + sleep 5; \ + (echo fnord; echo fnord) | CRYPTECH_KEYSTORE=${HSMBULLY_KS_CLIENT} ./p11util --set-so-pin --set-user-pin --pin-from-stdin; \ + PKCS11_DATABASE=${HSMBULLY_DATABASE} CRYPTECH_KEYSTORE=${HSMBULLY_KS_CLIENT} ${HSMBULLY} ${HSMBULLY_OPTIONS}; \ sudo kill $$pid; \ + else \ + (echo fnord; echo fnord) | sudo CRYPTECH_KEYSTORE=${HSMBULLY_KS_CLIENT} ./p11util --set-so-pin --set-user-pin --pin-from-stdin; \ + sudo PKCS11_DATABASE=${HSMBULLY_DATABASE} CRYPTECH_KEYSTORE=${HSMBULLY_KS_CLIENT} ${HSMBULLY} ${HSMBULLY_OPTIONS}; \ fi; \ sudo rm -f ${HSMBULLY_DATABASE} ${HSMBULLY_DATABASE}-journal ${HSMBULLY_KS_CLIENT} ${HSMBULLY_KS_SERVER} |