aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hx509/test_ca.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hx509/test_ca.in')
-rw-r--r--lib/hx509/test_ca.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/hx509/test_ca.in b/lib/hx509/test_ca.in
index 2ca294ea79e9..0264116bbe69 100644
--- a/lib/hx509/test_ca.in
+++ b/lib/hx509/test_ca.in
@@ -421,4 +421,32 @@ ${hxtool} verify --missing-revoke \
cert:FILE:cert-ee.pem \
anchor:FILE:cert-ca.pem > /dev/null || exit 1
+echo "+++++++++++ test sigalg"
+
+echo "issue cert with sha256"
+${hxtool} issue-certificate \
+ --ca-certificate=FILE:cert-ca.pem \
+ --signature-algorithm=rsa-with-sha256 \
+ --subject="cn=foo" \
+ --req="PKCS10:pkcs10-request.der" \
+ --certificate="FILE:cert-ee.pem" || exit 1
+
+echo "verify certificate"
+${hxtool} verify --missing-revoke \
+ cert:FILE:cert-ee.pem \
+ anchor:FILE:cert-ca.pem > /dev/null || exit 1
+
+echo "issue cert with sha1"
+${hxtool} issue-certificate \
+ --ca-certificate=FILE:cert-ca.pem \
+ --signature-algorithm=rsa-with-sha1 \
+ --subject="cn=foo" \
+ --req="PKCS10:pkcs10-request.der" \
+ --certificate="FILE:cert-ee.pem" || exit 1
+
+echo "verify certificate"
+${hxtool} verify --missing-revoke \
+ cert:FILE:cert-ee.pem \
+ anchor:FILE:cert-ca.pem > /dev/null || exit 1
+
exit 0