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