#!/bin/sh

pwd=`pwd`
eloc=`which creddy | sed 's/\/creddy//'`
if [ "$eloc" = "" ]; then
  echo "ERROR: creddy is not in the search path!!!"
  exit 1
fi

$eloc/creddy --attribute \
       --issuer Acme_ID.pem --key Acme_private.pem --role roleOne \
       --subject-cert Acme_ID.pem --subject-role simple_subject_role \
       --out Acme_roleOne__Acme_simple_subject_role.xml

$eloc/creddy --attribute \
       --issuer Acme_ID.pem --role roleTwo \
       --subject-cert Acme_ID.pem --subject-role simple_subject_role \
       --out Acme_roleTwo__Acme_simple_subject_role.xml

$eloc/creddy --attribute \
       --issuer Acme_ID.pem --key Acme_private.pem --role roleThree \
       --subject-cert Coyote_ID.pem --subject-role simple_subject_role \
       --out Acme_roleThree__Coyote_simple_subject_role.xml

$eloc/creddy --attribute \
       --issuer Acme_ID.pem --key Coyote_private.pem --role roleFour \
       --subject-cert Coyote_ID.pem --subject-role simple_subject_role \
       --out Acme_roleFour__Coyote_simple_subject_role.xml


