1 | #!/usr/bin/env sh |
---|
2 | #attribute.sh |
---|
3 | |
---|
4 | if [ -z "${TESTDIR}" ] ; then |
---|
5 | TESTDIR=.. |
---|
6 | fi |
---|
7 | . ${TESTDIR}/test_util.sh |
---|
8 | |
---|
9 | runTest "creddy_tests/attribute.sh" "test1" \ |
---|
10 | "$eloc/creddy --attribute \ |
---|
11 | --issuer Acme_ID.pem --key Acme_private.pem --role roleOne \ |
---|
12 | --subject-cert Acme_ID.pem --subject-role simple_subject_role \ |
---|
13 | --out Acme_roleOne__Acme_simple_subject_role_attr.xml" \ |
---|
14 | 0 "simple role attribute creation with same issuer" |
---|
15 | |
---|
16 | runTest "creddy_tests/attribute.sh" "test2" \ |
---|
17 | "$eloc/creddy --attribute \ |
---|
18 | --issuer Acme_ID.pem --role roleTwo \ |
---|
19 | --subject-cert Acme_ID.pem --subject-role simple_subject_role \ |
---|
20 | --out Acme_roleTwo__Acme_simple_subject_role_attr.xml" \ |
---|
21 | 1 "simple role attribute creation without privkey key" |
---|
22 | |
---|
23 | runTest "creddy_tests/attribute.sh" "test3" \ |
---|
24 | "$eloc/creddy --attribute \ |
---|
25 | --issuer Acme_ID.pem --key Acme_private.pem --role roleThree \ |
---|
26 | --subject-cert Coyote_ID.pem --subject-role simple_subject_role \ |
---|
27 | --out Acme_roleThree__Coyote_simple_subject_role_attr.xml" \ |
---|
28 | 0 "simple role attribute creation with differ issuer certs" |
---|
29 | |
---|
30 | runTest "creddy_tests/attribute.sh" "test4" \ |
---|
31 | "$eloc/creddy --attribute \ |
---|
32 | --issuer Acme_ID.pem --key Coyote_private.pem --role roleFour \ |
---|
33 | --subject-cert Coyote_ID.pem --subject-role simple_subject_role \ |
---|
34 | --out Acme_roleFour__Coyote_simple_subject_role_attr.xml" \ |
---|
35 | 1 "simple role attribute creation with wrong privkey key" |
---|
36 | |
---|