[461541a] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | #This example demonstrates intersections. |
---|
| 4 | # |
---|
| 5 | #In order to buy rockets from Acme, you must be BOTH a preferred customer |
---|
| 6 | #AND a WarnerBros character. In this example, the following query will be |
---|
| 7 | #successful: |
---|
| 8 | # |
---|
| 9 | # Acme.buy_rockets <-?- Coyote |
---|
| 10 | # |
---|
| 11 | #The following query will fail (because Batman does not have the |
---|
| 12 | #attribute WarnerBros.character): |
---|
| 13 | # |
---|
| 14 | # Acme.buy_rockets <-?- Batman |
---|
| 15 | # |
---|
| 16 | #Acme.buy_rockets <- Acme.preferred_customer & WarnerBros.character |
---|
| 17 | #Acme.preferred_customer <- Coyote |
---|
| 18 | #Acme.preferred_customer <- Batman |
---|
| 19 | #WarnerBros.character <- Coyote |
---|
| 20 | # |
---|
| 21 | |
---|
| 22 | rm -rf *.xml *.pem |
---|
[6180394] | 23 | |
---|
| 24 | creddy --generate --cn Acme |
---|
| 25 | |
---|
| 26 | creddy --generate --cn WarnerBros |
---|
| 27 | |
---|
| 28 | creddy --generate --cn Coyote |
---|
| 29 | |
---|
| 30 | creddy --generate --cn Batman |
---|
| 31 | |
---|
| 32 | creddy --attribute \ |
---|
| 33 | --issuer Acme_ID.pem --key Acme_private.pem --role buy_rockets \ |
---|
| 34 | --subject-cert Acme_ID.pem --subject-role preferred_customer \ |
---|
| 35 | --subject-cert WarnerBros_ID.pem --subject-role character \ |
---|
[461541a] | 36 | --out Acme_buy_rockets__Acme_preferred_customer_and_WarnerBros_character_attr.xml |
---|
[6180394] | 37 | |
---|
| 38 | creddy --attribute \ |
---|
| 39 | --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \ |
---|
| 40 | --subject-cert Coyote_ID.pem \ |
---|
[461541a] | 41 | --out Acme_preferred_customer__Coyote_attr.xml |
---|
[6180394] | 42 | |
---|
| 43 | creddy --attribute \ |
---|
| 44 | --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \ |
---|
| 45 | --subject-cert Batman_ID.pem \ |
---|
[461541a] | 46 | --out Acme_preferred_customer__Batman_attr.xml |
---|
[6180394] | 47 | |
---|
| 48 | creddy --attribute \ |
---|
| 49 | --issuer WarnerBros_ID.pem --key WarnerBros_private.pem --role character \ |
---|
| 50 | --subject-cert Coyote_ID.pem \ |
---|
[461541a] | 51 | --out WarnerBros_character__Coyote_attr.xml |
---|
| 52 | |
---|