1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
check_SCRIPTS = \
grid-proxy-utils-test.pl \
proxy-order-test.pl
check_DATA = \
testcred.key \
testcred.cert \
testcred.cakey \
testcred.cacert \
testcred.link \
testcred.signing_policy \
testcred.srl
if CYGPATH_W_DEFINED
X509_CERT_DIR = $$($(CYGPATH_W) $(abs_builddir))
else
X509_CERT_DIR = $(abs_builddir)
endif
if ENABLE_TESTS
TESTS = $(check_SCRIPTS)
TESTS_ENVIRONMENT = \
export X509_USER_CERT=testcred.cert \
X509_USER_KEY=testcred.key \
X509_CERT_DIR=$(X509_CERT_DIR) \
PATH=../programs:$$PATH;
# Test CA
.cnf.cacert:
umask 077; $(OPENSSL) req -passout pass:globus -subj "/CN=ca" -new -x509 -extensions v3_ca -keyout $*.cakey -out $@ -config $<
.cacert.cakey:
:
.cacert.link:
linkname="`$(OPENSSL) x509 -hash -noout -in $<`.0"; \
rm -f "$$linkname"; \
cp $< "$$linkname"; \
echo "$$linkname" > $@
.link.signing_policy:
linkname=`cat $<`; \
policyfile=$${linkname%.0}.signing_policy; \
echo "access_id_CA X509 '/CN=ca'" > $${policyfile}; \
echo "pos_rights globus CA:sign" >> $${policyfile}; \
echo "cond_subjects globus '\"/*\"'" >> $${policyfile}; \
echo $${policyfile} >> $@
.signing_policy.srl:
echo 01 > $@
# Test Cert/Key
.srl.key:
umask 077; $(OPENSSL) genrsa -out $@ 2048
.key.req:
$(OPENSSL) req -subj "/CN=test" -new -key $< -out $@ -config $*.cnf
.req.cert:
umask 022; $(OPENSSL) x509 -passin pass:globus -req -days 365 -in testcred.req -CA $*.cacert -CAkey $*.cakey -out $@
SUFFIXES = .key .req .cert .srl .link .signing_policy .cacert .cakey
CLEANFILES = \
testcred.key testcred.cert testcred.req \
testcred.cacert testcred.srl \
testcred.cakey \
proxytest.*
clean-local:
if [ -f testcred.link ]; then \
rm -f "$$(cat testcred.link)" testcred.link; \
fi
if test -f testcred.signing_policy; then \
rm -f $$(cat testcred.signing_policy) testcred.signing_policy; \
fi
endif
EXTRA_DIST = $(EXTRA_SCRIPTS) $(check_SCRIPTS)
|