From 92288a71376afd524b9a8e8458f4491d0af9d3d9 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Fri, 14 Aug 2009 16:24:35 +0200 Subject: [PATCH] Avoid testing ECDSA when hcrypto doesn't support it --- lib/hx509/test_chain.in | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/hx509/test_chain.in b/lib/hx509/test_chain.in index 5f5b187d2..df551d9c0 100644 --- a/lib/hx509/test_chain.in +++ b/lib/hx509/test_chain.in @@ -187,15 +187,19 @@ ${hxtool} verify \ anchor:FILE:$srcdir/data/ca.crt \ crl:FILE:$srcdir/data/crl1.der > /dev/null && exit 1 -echo "eccert -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/secp160r2TestServer.cert.pem \ - anchor:FILE:$srcdir/data/secp160r1TestCA.cert.pem > /dev/null || exit 1 - -echo "eccert -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/secp160r2TestClient.cert.pem \ - anchor:FILE:$srcdir/data/secp160r1TestCA.cert.pem > /dev/null || exit 1 +if ${hxtool} info | grep 'ecdsa: hcrypto null' > /dev/null ; then + echo "not testing ECDSA since hcrypto doesnt support ECDSA" +else + echo "eccert -> root" + ${hxtool} verify --missing-revoke \ + cert:FILE:$srcdir/data/secp160r2TestServer.cert.pem \ + anchor:FILE:$srcdir/data/secp160r1TestCA.cert.pem > /dev/null || exit 1 + + echo "eccert -> root" + ${hxtool} verify --missing-revoke \ + cert:FILE:$srcdir/data/secp160r2TestClient.cert.pem \ + anchor:FILE:$srcdir/data/secp160r1TestCA.cert.pem > /dev/null || exit 1 +fi echo "proxy cert" ${hxtool} verify --missing-revoke \