aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2017-05-20 14:37:34 -0400
committerRob Austein <sra@hactrn.net>2017-05-20 14:37:34 -0400
commit88603b2c457591c9522883bd2354c56640ecd4c1 (patch)
treec212dcd13aa3c601f3171812ffb567e511bee841 /Makefile
parente3895b98b1ddaf8303f1374b52f91b85b92df94b (diff)
Clean up ancient cruft: p11util, SQL-based hsmbully test.
p11util has long since been overtaken by developments: everything it used to do is now doable on the console, and if for some reason we really needed a tool to change PINs via the RPC port, we could do it in a dozen lines of Python using the cryptech.libhal RPC API. hsmbully may still be a useful test, but all the antics with configuring SQL database and on-disk keystores is long since obsolete.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 3 insertions, 31 deletions
diff --git a/Makefile b/Makefile
index ccee996..1c33e13 100644
--- a/Makefile
+++ b/Makefile
@@ -138,10 +138,10 @@ ifndef OBJCOPY
OBJCOPY := objcopy
endif
-all: ${SONAME} p11util cryptech/py11/attribute_map.py
+all: ${SONAME} cryptech/py11/attribute_map.py
clean:
- rm -rf *.o ${SONAME}* p11util attributes.h cryptech/*.pyc cryptech/py11/*.pyc
+ rm -rf *.o ${SONAME}* attributes.h cryptech/*.pyc cryptech/py11/*.pyc
${MAKE} -C libtfm $@
${MAKE} -C libhal $@
@@ -179,12 +179,6 @@ else
endif
-p11util.o: p11util.c
- ${CC} ${CFLAGS} -c $<
-
-p11util: p11util.o ${LIBS}
- ${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}
-
tags: TAGS
TAGS: *.[ch]
@@ -205,29 +199,7 @@ ifneq "${HSMBULLY}" ""
--pin fnord --so-pin fnord --pkcs11lib $(abspath ${SONAME}) \
--verbose=9 --fast-and-frivolous --skip-fragmentation --skip-keysizing
- HSMBULLY_DATABASE=$(abspath hsmbully.pkcs11.db)
- HSMBULLY_KS_CLIENT=$(abspath hsmbully.client-keystore)
- HSMBULLY_KS_SERVER=$(abspath hsmbully.server-keystore)
-
- HSMBULLY_SERVER_BIN=$(wildcard $(abspath ../libhal/tests/test-rpc_server))
-
bully: all
- set -x; \
- rm -f ${HSMBULLY_DATABASE} ${HSMBULLY_DATABASE}-journal ${HSMBULLY_KS_CLIENT} ${HSMBULLY_KS_SERVER}; \
- if test -x '${HSMBULLY_SERVER_BIN}'; \
- then \
- CRYPTECH_KEYSTORE=${HSMBULLY_KS_SERVER} ${HSMBULLY_SERVER_BIN} & \
- pid=$$!; \
- sleep 5; \
- (echo YouReallyNeedToChangeThisPINRightNowWeAreNotKidding; 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}; \
- kill $$pid; \
- else \
- (echo YouReallyNeedToChangeThisPINRightNowWeAreNotKidding; 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}; \
- fi; \
- rm -f ${HSMBULLY_DATABASE} ${HSMBULLY_DATABASE}-journal ${HSMBULLY_KS_CLIENT} ${HSMBULLY_KS_SERVER}
+ ${HSMBULLY} ${HSMBULLY_OPTIONS}
endif