Changeset 3c30b59


Ignore:
Timestamp:
Jul 11, 2013 3:37:01 PM (6 years ago)
Author:
Mei <mei@…>
Branches:
abac0-leak, abac0-mei, master
Children:
6cd69a0
Parents:
81c80b9
Message:

1) add in new refactored regression testing directory
2) undo the abac.hh/ABAC.hh api changes
3) merged with Ted's changes to attribute format/nickname/issuer processing

Files:
23 added
32 deleted
58 edited
3 moved

Legend:

Unmodified
Added
Removed
  • Makefile.am

    r94605f2 r3c30b59  
    44bin_PROGRAMS = libabac/abac_prover libabac/abac_prover_plus \
    55               creddy/creddy
    6 EXTRA_DIST = doc java tests cred_printer
     6EXTRA_DIST = doc java cred_printer tests
    77
    88lib_LTLIBRARIES = libabac/libabac.la
     
    3333    libabac/uthash.h \
    3434    libabac/utlist.h
    35 
    3635libabac_libabac_la_LDFLAGS = -version-info 2:0:0
    3736libabac_libabac_la_LIBADD = $(XML2_LDFLAGS) $(XMLSEC1_LDFLAGS) $(OPENSSL_LIBS)
    3837
    39 libabac_abac_prover_SOURCES = libabac/prover.c libabac/options.c libabac/options.h libabac/abac.h
     38libabac_abac_prover_SOURCES = libabac/prover.c libabac/options.c libabac/options.h \
     39                              libabac/abac.h
    4040libabac_abac_prover_LDADD = $(top_builddir)/libabac/libabac.la
    4141
    42 libabac_abac_prover_plus_SOURCES = libabac/prover_plus.cc libabac/options.c libabac/options.h libabac/abac.hh
     42libabac_abac_prover_plus_SOURCES = libabac/prover_plus.cc libabac/options.c \
     43                                   libabac/options.h libabac/abac.hh
    4344libabac_abac_prover_plus_LDADD = $(top_builddir)/libabac/libabac.la
    4445
     
    6263# version.  These lines fall back to the AX_ versions of the swig parameters if
    6364# the bare SWIG_ versions are not set.
    64 SWIG_PYTHON_CPPFLAGS ?= ${AX_SWIG_PYTHON_CPPFLAGS}
    65 SWIG_PYTHON_OPT ?= ${AX_SWIG_PYTHON_OPT}
     65SWIG_PYTHON_CPPFLAGS ?= $(AX_SWIG_PYTHON_CPPFLAGS)
     66SWIG_PYTHON_OPT ?= $(AX_SWIG_PYTHON_OPT)
    6667
    6768#
    68 # SWIG
     69# SWIG 
    6970EXTRA_DIST += swig/abac.i swig/perl/language.i swig/perl/chunk.i \
    7071              swig/python/chunk.i swig/python/language.i
     72
    7173#
    7274# Python
     
    7678python_PYTHON = swig/python/ABAC.py
    7779pyexec_LTLIBRARIES = swig/python/_ABAC.la
    78 EXTRA_DIST += swig/python/abac_prover.py
    79 
    8080# Swig/Python/ABAC
    8181swig_python__ABAC_la_SOURCES = swig/python/abac_wrap.cxx swig/python/ABAC.py \
    82                                swig/python/chunk.i swig/python/language.i
     82                               swig/python/chunk.i swig/python/language.i \
     83                               swig/python/abac_prover.py
    8384swig_python__ABAC_la_CPPFLAGS = $(SWIG_PYTHON_CPPFLAGS)
    8485swig_python__ABAC_la_LDFLAGS = -module
     
    103104perldir = @SITE_PERL@
    104105bin_SCRIPTS += swig/perl/abac_prover.pl
    105 perl_SCRIPTS = swig/perl/ABAC.pm
     106perl_SCRIPTS = swig/perl/abac_wrap.cxx swig/perl/ABAC.pm
    106107perl_LTLIBRARIES = swig/perl/ABAC.la
    107 EXTRA_DIST += swig/perl/abac_prover.pl
    108108# Swig/Perl/ABAC
    109109swig_perl_ABAC_la_SOURCES = swig/perl/abac_wrap.cxx swig/perl/SSL_keyid.c \
    110                             swig/perl/SSL_keyid.h  swig/perl/ABAC.pm \
    111                             swig/perl/chunk.i swig/perl/language.i
     110                            swig/perl/SSL_keyid.h  swig/perl/ABAC.pm      \
     111                            swig/perl/chunk.i swig/perl/language.i \
     112                            swig/perl/abac_prover.pl
    112113swig_perl_ABAC_la_CPPFLAGS = `perl -MExtUtils::Embed -e ccopts`
    113114swig_perl_ABAC_la_LDFLAGS = -module
     
    131132           $(XMLSEC1_INCLUDES) $(XML2_INCLUDES) $(OPENSSL_INCLUDEs)
    132133
    133 AM_CFLAGS = \
    134         -DABAC_VERSION=\""${VERSION}\""
     134AM_CFLAGS = -DABAC_VERSION=\""$(VERSION)\""
    135135
    136136ACLOCAL_AMFLAGS=-I m4
     
    141141library_include_HEADERS = libabac/abac.h libabac/abac.hh
    142142
    143 .PHONY: clean-local-java install-exec-local clean-local-doc clean-local-swig
     143.PHONY: clean-local-java install-exec-local clean-local-doc clean-local-swig clean-local-tests testing api
    144144
    145 clean-local: clean-local-java clean-local-doc clean-local-swig
     145clean-local:    clean-local-java clean-local-doc clean-local-swig clean-local-tests
    146146
    147147clean-local-java:
     
    156156        rm -rf swig/perl/abac_wrap.cxx swig/python/abac_wrap.cxx
    157157
     158clean-local-tests:
     159        cd tests && make clean
     160
    158161dist-hook:
    159162        if which ant ; then \
    160163                cd $(distdir)/java && ant clean ; \
    161164        fi
    162         cd $(distdir)/tests && pwd && $(MAKE) clean
     165        cd tests && make clean
     166        cd cred_printer && make clean
    163167
    164 make-api: doc/extract_doc.c
     168api: doc/extract_doc.c
    165169        $(CC) -o doc/extract_doc doc/extract_doc.c
    166         cd doc && pwd && ./extract_doc && $(am__mv) abac.hh ../libabac
     170        cp libabac/abac.hh doc/abac.hh 
     171        cd doc && pwd && ./extract_doc
     172
     173testing:
     174        cd tests && make -s tests
    167175
    168176install-data-hook:
     
    170178        @echo '+-------------------------------------------------------------+'
    171179        @echo '| A friendly reminder:                                        |'
    172         @echo '| If you have not already run "make runcheck" in tests,       |'
    173         @echo '| then we strongly recommend you do so to expose any          |'
    174         @echo '| possible setup problem.                                     |'
     180        @echo '| If you have not already run "make testing", then we strongly  |'
     181        @echo '| recommend you do so to expose any possible setup problem.   |'
    175182        @echo '+-------------------------------------------------------------+'
    176183        @echo ''
  • configure.ac

    rc00fcc3 r3c30b59  
    1 AC_INIT([ABAC], [0.1.4], [faber@ISI.EDU])
     1AC_INIT([ABAC], [0.1.5], [faber@ISI.EDU])
    22AC_CONFIG_SRCDIR([libabac/abac_role.c])
    33AM_INIT_AUTOMAKE([foreign subdir-objects])
     
    7373AC_CHECK_FUNCS([atexit memset strchr strdup readpassphrase])
    7474
    75 AC_CONFIG_FILES([Makefile])
     75AC_CONFIG_FILES([Makefile tests/Makefile tests/creddy_tests/Makefile tests/creddy_prover_tests/Makefile tests/attr_tests/Makefile tests/python_tests/Makefile tests/scaling_tests/Makefile tests/scaling_tests/daisychain/Makefile tests/scaling_tests/daisychain/likes_python/Makefile tests/example_scripts/Makefile tests/example_scripts/wiki/Makefile tests/example_scripts/c/Makefile tests/example_scripts/python/Makefile tests/example_scripts/perl/Makefile])
    7676AC_OUTPUT
  • cred_printer/Makefile

    rec550f7 r3c30b59  
    1010        python ./setup.py sdist
    1111
    12 distclean clean:
     12distclean:
    1313        rm -rf cred_printer-${VERSION}
    1414        rm -rf *.pyc *.core dist MANIFEST
     15clean:
     16        rm -rf cred_printer-${VERSION}
     17        rm -rf *.pyc *.core dist MANIFEST
     18
  • doc/ABAC.hh

    r34565bf r3c30b59  
    77#include <vector>
    88
    9 /* This file is generated from doc/ABAC.hh by doc/extract_doc.c */
    10 
    119namespace ABAC {
    1210    extern "C" {
     
    1917    class Credential;
    2018
    21 /***
    22 ABAC::Context
    23     An ABAC Context
    24 ***/
    2519    class Context {
    2620        public:
    27 /***
    28 f  Context()
    29      default constructor
    30      (C:abac_context_new)
    31 f  Context(const Context &)
    32      copy constructor, used for cloning the context
    33      (C:abac_context_dup)
    34 f  ~Context()
    35      default destructor
    36      (C:abac_context_free)
    37 ***/
    3821            Context() { m_ctx = abac_context_new(); }
    3922            Context(const Context &context) { m_ctx = abac_context_dup(context.m_ctx); }
    4023            ~Context() { abac_context_free(m_ctx); }
    4124
    42 /***
    43 f  int load_id_file(char *)
    44      load identity certificate from an id file
    45      (C:abac_context_load_id_file)
    46 f  int load_id_chunk(abac_chunk_t)
    47      load id certificate from an chunk
    48      (C:abac_context_load_id_chunk)
    49 f  int load_attribute_file(char *)
    50      load attribute certificate from an id file.
    51      (C:abac_context_load_attribute_file)
    52 f  int load_attribute_chunk(abac_chunk_t)
    53      load attribute certificate from an chunk
    54      (C:abac_context_load_attribute_chunk)
    55 f  returns :
    56         ABAC_CERT_SUCCESS   successfully loaded
    57         ABAC_CERT_INVALID   invalid certificate (or file not found)
    58         ABAC_CERT_BAD_SIG   invalid signature
    59 ***/
    6025            int load_id_file(char *filename) { return abac_context_load_id_file(m_ctx, filename); }
    6126            int load_id_chunk(abac_chunk_t cert) { return abac_context_load_id_chunk(m_ctx, cert); }
     
    6328            int load_attribute_chunk(abac_chunk_t cert) { return abac_context_load_attribute_chunk(m_ctx, cert); }
    6429
    65 /***
    66 f  void load_directory(char *)
    67      load a directory full of certificates:
    68 f       first: ${path}/*_ID.{der,pem} as identity certificates
    69                implicitly looking for ${path}/*_private.{der,pem} as
    70                the private key file
    71         last: ${path}/*_attr.xml as attribute certificates
    72       (C:abac_context_load_directory)
    73 ***/
    7430            void load_directory(char *path) { abac_context_load_directory(m_ctx, path); }
    7531
    76 /***
    77 f  std::vector<Credential> query(char *, char *, bool &)
    78      run the query:
    79         role <-?- principal
    80      returns true/false in success
    81      returns a proof upon success, partial proof on failure
    82      (C:abac_context_query)
    83      (C::abac_free_credentials_free)
    84 ***/
    8532
    8633            /* abac query, returns a vector of credentials on success, NULL on fail */
     
    9946                return credentials;
    10047            }
    101 /***
    102 f  std::vector<Credential> credentials(bool &)
    103      returns a vector of all the credentials loaded in the context
    104      (C:abac_context_credentials)
    105      (C::abac_context_credentials_free)
    106 ***/
    10748            std::vector<Credential> credentials() {
    10849                abac_credential_t **creds, **end;
     
    11960                return credentials;
    12061            }
    121 /***
    122 f  void set_nickname(char *key, char *nick)
    123      Set the nickname (value printed) for keyid.  The substitution is made
    124      in Role::short_string(Context) and when bake(Context) is called on a new
    125      attribute.
    126 ***/
    12762        void set_nickname(char *key, char *nick) {
    12863            abac_context_set_nickname(m_ctx, key, nick);
     
    13469    };
    13570
    136 /***
    137 ABAC::Role
    138    A Role, most calls are rarely used outside the library
    139 ***/
    14071    class Role {
    14172        public:
    142 /***
    143 f  Role()
    144      default constructor, do not use, for swig only
    145 f  Role(abac_role_t*)
    146      copy constructor, used for cloning an Role
    147      (C:abac_role_dup)
    148 f  Role(char *)
    149      instantiate a role from a string
    150      (C:abac_role_from_string)
    151 f  Role(const Role &)
    152      copy constructor, used for cloning an Role
    153      (C:abac_role_dup)
    154 f  ~Role()
    155      default destructor
    156      (C:abac_role_free)
    157 ***/
    15873            Role() : m_role(NULL) { } // do not use: here for swig
    15974            Role(abac_role_t *role) { m_role = abac_role_dup(role); }
     
    16176            Role(const Role &role) { m_role = abac_role_dup(role.m_role); }
    16277            ~Role() { abac_role_free(m_role); }
    163 /***
    164 f  bool is_principal()
    165      (C:abac_role_is_principal)
    166 f  bool is_role()
    167      (C:abac_role_is_role)
    168 f  bool is_linking()
    169      (C:abac_role_is_linking)
    170      indicates the type of role encoded
    171 ***/
    17278            bool is_principal() const { return abac_role_is_principal(m_role); }
    17379            bool is_role() const { return abac_role_is_role(m_role); }
    17480            bool is_linking() const { return abac_role_is_linking(m_role); }
    17581
    176 /***
    177 f  char* string()
    178      string representation of the role
    179      (C:abac_role_string)
    180 ***/
    18182            char *string() const { return abac_role_string(m_role); }
    182 /***
    183 f  char* short_string()
    184      string representation of the role
    185      (C:abac_role_string)
    186 ***/
    18783            char *short_string(Context& c) const {
    18884                return abac_role_short_string(m_role, c.m_ctx);
    18985            }
    190 /***
    191 f  char* linked_role()
    192      the linked role of a linking role
    193      i.e., A.r1.r2, linked_role() returns A.r1
    194      (C:abac_role_linked_role)
    195 f  char* role_name()
    196      the role name of any role (the part after the last dot)
    197      (C:abac_role_role_name)
    198 f  char* principal()
    199      the principal part of any role
    200      (C:abac_role_principal)
    201 ***/
    20286            char *linked_role() const { return abac_role_linked_role(m_role); }
    20387            char *role_name() const { return abac_role_role_name(m_role); }
     
    20892    };
    20993
    210 /***
    211 ABAC::Credential
    212    This is never instantiated directly. These will only ever be
    213    returned as a result of calls to Context::query or
    214    Context::credentials.
    215 ***/
    21694    class Credential {
    21795        public:
    218 /***
    219 f  Credential()
    220      default constructor, do not use, for swig only
    221 f  Credential(abac_credential_t*)
    222      copy constructor, used for cloning a credential
    223      (C:abac_credential_head)
    224      (C:abac_credential_tail)
    225      (C:abac_credential_dup)
    226 f  Credential(const Credential&)
    227      copy constructor, used for cloning a credential
    228      (C:abac_credential_head)
    229      (C:abac_credential_tail)
    230      (C:abac_credential_dup)
    231 f  ~Credential()
    232      default destructor
    233      (C:abac_credential_free)
    234 ***/
    23596            Credential() : m_cred(NULL) { } // do not use: here for swig
    23697            Credential(abac_credential_t *cred) :
     
    245106                    { }
    246107            ~Credential() { abac_credential_free(m_cred); }
    247 /***
    248 f  Role &head()
    249      returns the head of the credential
    250 f  Role &tail()
    251      returns the tail of the credential
    252 ***/
    253108            const Role &head() { return m_head; }
    254109            const Role &tail() { return m_tail; }
    255 /***
    256 f  abac_chunk_t attribute_cert()
    257      returns the attribute certificate in chunk, suitable for
    258      transmission over the network or storage in a file
    259      (C:abac_credential_attribute_cert)
    260 f  abac_chunk_t issuer_cert()
    261      returns the issuer certificate in chunk, again suitable for
    262      network transmission or file storage
    263      (C:abac_credential_issuer_cert)
    264 ***/
    265110            abac_chunk_t attribute_cert() { return abac_credential_attribute_cert(m_cred); }
    266111            abac_chunk_t issuer_cert() { return abac_credential_issuer_cert(m_cred); }
     
    272117
    273118
    274 /***
    275 ABAC::ID
    276    An ID holds a principal credential. It maybe imported from an existing
    277    ID credential via external files, constructed from a streaming chunk,
    278    or instantiated on the fly
    279 ***/
    280119    class ID {
    281120        public:
    282 /***
    283 f  ID()
    284      default constructor, do not use, for swig only
    285 f  ID(const ID &)
    286      copy constructor, used for cloning an ID
    287      (C:abac_id_dup)
    288 f  ~ID()
    289      default destructor
    290      (C:abac_id_free)
    291 ***/
    292121            ID() : m_id(NULL) { } // do not use: required by swig
    293122            ID(const ID &id) { m_id = abac_id_dup(id.m_id); }
    294123            ~ID() { abac_id_free(m_id); }
    295124
    296 /***
    297 f  ID(char *)
    298      load an ID certificate from a file, will throw an exception
    299      if the certificate cannot be loaded
    300      (C:abac_id_from_file)
    301 ***/
    302125            ID(char *filename) : m_id(NULL) {
    303126                m_id = abac_id_from_file(filename);
     
    306129            }
    307130
    308 /***
    309 f  ID_chunk(abac_chunk_t chunk)
    310      create an ID certificate from an certificate chunk, will
    311      throw an exception if the certificate cannot be loaded
    312      (C:abac_id_from_chunk)
    313 ***/
    314131            ID(abac_chunk_t chunk) : m_id(NULL) {
    315132                m_id = abac_id_from_chunk(chunk);
     
    317134                    throw std::invalid_argument("Could not load ID certificate with a chunk");
    318135            }
    319 /***
    320 f  ID(char *,int)
    321      generates a new ID(cert&key) with the supplied CN and validity period
    322      - CN must be alphanumeric and begin with a letter
    323      - validity must be at least one second
    324      will throw an exception if either of the above is violated
    325      (C:abac_id_generate)
    326 ***/
    327136            ID(char *cn, int validity) : m_id(NULL) {
    328137                int ret = abac_id_generate(&m_id, cn, validity);
     
    332141                    throw std::invalid_argument("Validity must be > 0 days");
    333142            }
    334 /***
    335 f  void load_privkey(char *)
    336      loads the private key associated with the ID credential,
    337      will throw an exception if the key cannot be loaded
    338      (C:abac_id_privkey_from_file)
    339 f  void load_privkey_chunk(abac_chunk_t)
    340      loads the private key associated with the ID credential,
    341      will throw an exception if the key cannot be loaded
    342      (C:abac_id_privkey_from_chunk)
    343 f  int has_privkey()
    344      check to see if there is a privkey in this ID
    345      (C:abac_id_has_privkey)
    346 ***/
    347143            void load_privkey(char *filename) {
    348144                int ret = abac_id_privkey_from_file(m_id, filename);
     
    359155                return ret;
    360156            }
    361 /***
    362 f  char *keyid()
    363      returns the SHA1 keyid of the id cert
    364      (C:abac_id_keyid)
    365 f  char *cert_filename()
    366      returns the default libabac filename for the cert.
    367      value must be freed by caller.
    368      (C:abac_id_cert_filename)
    369 ***/
    370157            char *keyid() { return abac_id_keyid(m_id); }
    371158            char *cert_filename() { return abac_id_cert_filename(m_id); }
    372 /***
    373 f  void write_cert(FILE *)
    374      writes a PEM-encoded certificate to a file handle
    375      (C:abac_id_write_cert)
    376 f  void write_cert(string &)
    377      writes a PEM-encoded certificate to a file named in string
    378 f  void write_cert_file(const char *)
    379      writes a PEM-encoded certificate to a file
    380 f  void write_cert_name(const char *)
    381      writes a PEM-encoded certificate to a file
    382      (added to support original libcreddy users)
    383 ***/
    384159            void write_cert(FILE *out) { abac_id_write_cert(m_id, out); }
    385160            void write_cert(const std::string &name) {
     
    398173                fprintf(stderr,"ABAC::ID::write_cert_name is deprecated, please use ABAC::ID::write_cert_name\n");
    399174            }
    400 /***
    401 f  char *privkey_filename()
    402      returns the default libabac filename for the private key.
    403      value must be freed by caller.
    404      (C:abac_id_privkey_filename)
    405 ***/
    406175            char *privkey_filename() { return abac_id_privkey_filename(m_id); }
    407 /***
    408 f  void write_privkey(FILE *)
    409      write the private key to a file handle
    410      throws a std::logic_error if no private key is loaded
    411      (C:abac_id_write_privkey)
    412 f  void write_privkey(string &)
    413      writes a private key to file named in string
    414 f  void write_privkey_file(const char *)
    415      writes a private key to a file
    416 f  void write_privkey_name(const char *)
    417      writes a private key to a file
    418      (added to support original libcreddy users)
    419 ***/
    420176            void write_privkey(FILE *out) {
    421177                int ret = abac_id_write_privkey(m_id, out);
     
    437193                fprintf(stderr,"ABAC::ID::write_privkey_name is deprecated, please use ABAC::ID::write_privkey_file\n");
    438194            }
    439 /***
    440 f  abac_chunk_t cert_chunk()
    441      returns a DER-encoded binary representation of the X.509 ID cert
    442      associated with this ID.
    443      can be passed to libabac's Context::load_id_chunk()
    444      (C:abac_id_cert_chunk)
    445 f  abac_chunk_t privkey_chunk()
    446      returns a PEM-encoded binary representation of the private key
    447      associated with this ID.
    448      (C:abac_id_privkey_chunk)
    449 ***/
    450195            abac_chunk_t cert_chunk() { return abac_id_cert_chunk(m_id); }
    451196            abac_chunk_t privkey_chunk() { return abac_id_privkey_chunk(m_id); }
     
    457202    };
    458203
    459 /***
    460 ABAC::Attribute
    461    This is the attribute representation for the access policy rule
    462        LHS <- RHS
    463    The sequence of generation is to
    464        first, instantiate the object, ie, LHS (head)
    465        second, adding subject(s) to it, ie, RHS (tail)
    466        and then baking it.
    467    Only once it's baked can you access the X.509 cert.
    468    Once it's been baked you can no longer add subjects to it
    469 ***/
    470204    class Attribute {
    471205        public:
    472 /***
    473 f  Attribute()
    474      default constructor, do not use, for swig only
    475 f  ~Attribute()
    476      default destructor
    477      (C:abac_attribute_free)
    478 ***/
    479206            Attribute() : m_attr(NULL) { } // do not use: required by swig
    480207            ~Attribute() { abac_attribute_free(m_attr); }
    481208
    482 /***
    483 f  Attribute(ID&, char*,int)
    484      constructor that creates an attribute policy to be signed by the issuer
    485      with the given role with a specified validity period
    486      An exception will be thrown if:
    487        - the issuer has no private key
    488        - the Head role is invalid
    489        - the validity period is invalid (must be >= 0 second)
    490        - The issuer is invalid
    491      (C:abac_attribute_create)
    492 ***/
    493209            Attribute(ID &issuer, char *role, int validity) : m_attr(NULL) {
    494210                int ret = abac_attribute_create(&m_attr, issuer.m_id, role, validity);
     
    504220
    505221
    506 /***
    507 f  bool principal(char *keyid)
    508      {keyid}
    509      validate the principal and insert into the attribute
    510      throw a std::logic_error if the cert's been baked and keyid bad
    511      (C:abac_attribute_principal)
    512 f bool role(char *keyid, char *role)
    513      {keyid.role}
    514      validate the principal and role and insert into the attribute
    515      throw a std::logic_error if the cert's been baked and keyid bad
    516      (C:abac_attribute_role)
    517 f bool linking_role(char *keyid, char *role, char *linked)
    518      {keyid.linked.role}
    519      validate the role and linking role and insert into the attribute
    520      throw a std::logic_error if the cert's been baked and keyid bad
    521      (C:abac_attribute_linking_role)
    522 ***/
    523222            bool principal(char *keyid) {
    524223                if (baked()) throw std::logic_error("Cert is already baked");
     
    533232                return abac_attribute_linking_role(m_attr, keyid, role, linked);
    534233            }
    535 /***
    536 f  bool bake()
    537      Generate the cert. Call this after you've added subjects to your cert.
    538      This returns false if there are no subjects
    539      This will throw an exception if the cert's already been baked.
    540      (C:abac_attribute_bake)
    541 ***/
    542234            bool bake() {
    543235                if (baked()) throw std::logic_error("Cert is already baked");
     
    545237            }
    546238
    547 /***
    548 f  bool bake(Context c)
    549      Generate the cert. Call this after you've added subjects to your cert.
    550      This returns false if there are no subjects
    551      This will throw an exception if the cert's already been baked.
    552      This version annotated the baked credential with any mnemonic names in the
    553      context.
    554      (C:abac_attribute_bake)
    555 ***/
    556239            bool bake(Context& c) {
    557240                if (baked()) throw std::logic_error("Cert is already baked");
     
    559242            }
    560243
    561 /***
    562 f  bool baked()
    563      returns true iff the certificate has been baked.
    564      (C:abac_attribute_baked)
    565 ***/
    566244            bool baked() { return abac_attribute_baked(m_attr); }
    567245
    568 /***
    569 f  set_output_format(char *fmt)
    570      {fmt}
    571      Set the attribute's output format.  Valid choices are GENIv1.0 and
    572      GENIV1.1.  Default is GENIv1.1.
    573 ***/
    574246            void set_output_format(char *fmt) {
    575247                abac_attribute_set_output_format(m_attr, fmt);
    576248            }
    577249
    578 /***
    579 f  get_output_format(char *fmt)
    580      Get the attribute's output format.  Do not delete the string/
    581 ***/
    582250            char *get_output_format() {
    583251                return abac_attribute_get_output_format(m_attr);
    584252            }
    585253
    586 /***
    587 f  void write(FILE *)
    588      write an attribute certificate in XML to an open file handle
    589      Throws an exception if the certificate isn't baked
    590      (C:abac_attribute_write)
    591 f  void write(const string&)
    592      write an attribute certificate in XML to file named in string
    593 f  void write_file(const char *)
    594      write an attribute certificate in XML to file
    595 f  void write_name(const char *)
    596      write an attribute certificate in XML to file
    597      (added to support original libcreddy users)
    598 ***/
    599254            void write(FILE *out) {
    600255                int ret = abac_attribute_write(m_attr, out);
     
    616271                fprintf(stderr,"ABAC::Attribute::write_name is deprecated, please use ABAC::Attribute::write_name\n");
    617272            }
    618 /***
    619 f  abac_chunk_t cert_chunk()
    620      returns a XML structure of the attribute certificate in a abac_chunk_t
    621      Throws an exception if the certificate isn't baked
    622      the chunk can be passed to libabac's Context::load_attribute_chunk()
    623      (C:abac_attribute_cert_chunk)
    624 ***/
    625273            abac_chunk_t cert_chunk() {
    626274                abac_chunk_t ret=abac_attribute_cert_chunk(m_attr);
  • doc/API

    r34565bf r3c30b59  
    7171     in Role::short_string(Context) and when bake(Context) is called on a new
    7272     attribute.
     73     (C:abac_context_set__short_string)
    7374
    7475ABAC::Role
     
    110111   char* short_string()
    111112     string representation of the role
    112      (C:abac_role_string)
     113     (C:abac_role_short_string)
    113114
    114115   char* linked_role()
  • doc/ChangeLog

    re2e8440 r3c30b59  
    11= 0.1.5 =
    22
    3     2013-XX-YY
     3    2013-07-YY
     4        * Support for human readable strings in credential printing.
     5          User can associate nicknames with principals and selectively
     6          have the mnemonic names used instead of the SHA1 hash of
     7          principl when outputting
     8        * New attribute credential format output, supports
     9          version 1.1 of GENI credential format
     10        * Accepts version 1.0 & 1.1  GENI credential formats in addition
     11          to original ABAC RT0 and GENI privilege attribute formats
     12        * Simplified input of self-contained credentials. For a
     13          self-contained credential like GNEI credential, there is no
     14          need for an explicit loading of issuer ID anymore and the
     15          issuer credential is automatically loaded into context if
     16          needed
    417        * Replaced the restrictive abac_context_load_directory search
    5           into any regular files in the keystore location is checked.
    6           Attempts to extract credentials follow the order,
    7           try for principal credential, if found, check for private key,
    8           or else try to retrieve as attribute credential
     18          into: any regular files in the keystore location is checked.
     19          Attempt to extract credentials follows this order,
     20          first, try extraction as principal credential, if found,
     21          check for private key, or else try to retrieve as attribute
     22          credential
    923        * Moved hashed principal credentials from global scope to
    1024          context based list of principal credentials
    11         * Added issuer credential insertion (if needed) during
    12           read_credential() call while processing attribute
    13           credential
    14         * examples are renamed into tests
     25        * examples are renamed into tests and reorganized under
     26          libabac's autoconf/automake setup and more information is
     27          generated when run
    1528
    1629= 0.1.4 =
  • doc/extract_doc.c

    r6d3fc40 r3c30b59  
    22   extract_doc.c,
    33
    4    This program extracts API doc from ABAC.hh and
    5       generates header file abac.hh for libabac and API
    6    This program assume ABAC.hh is local
     4   This program extracts API doc from abac.hh
     5   This program assume abac.hh is local
    76 
    87rules:
     
    9998{
    10099   char *selfname="extract_doc.c";
    101    char *filename="ABAC.hh";
     100   char *filename="abac.hh";
    102101   char *docname="API";
    103    char *codename="abac.hh";
     102   char *codename="ABAC.hh";
    104103
    105104   FILE *dfp=fopen(selfname,"r");
     
    116115       fclose(cfp);
    117116   }
    118    fprintf(stdout,"\nRemember to move abac.hh to libabac \n");
    119117   return 0;
    120118}
  • libabac/abac.hh

    r34565bf r3c30b59  
    77#include <vector>
    88
    9 /* This file is generated from doc/ABAC.hh by doc/extract_doc.c */
    10 
    119namespace ABAC {
    1210    extern "C" {
     
    1917    class Credential;
    2018
     19/***
     20ABAC::Context
     21    An ABAC Context
     22***/
    2123    class Context {
    2224        public:
     25/***
     26f  Context()
     27     default constructor
     28     (C:abac_context_new)
     29f  Context(const Context &)
     30     copy constructor, used for cloning the context
     31     (C:abac_context_dup)
     32f  ~Context()
     33     default destructor
     34     (C:abac_context_free)
     35***/
    2336            Context() { m_ctx = abac_context_new(); }
    2437            Context(const Context &context) { m_ctx = abac_context_dup(context.m_ctx); }
    2538            ~Context() { abac_context_free(m_ctx); }
    2639
     40/***
     41f  int load_id_file(char *)
     42     load identity certificate from an id file
     43     (C:abac_context_load_id_file)
     44f  int load_id_chunk(abac_chunk_t)
     45     load id certificate from an chunk
     46     (C:abac_context_load_id_chunk)
     47f  int load_attribute_file(char *)
     48     load attribute certificate from an id file.
     49     (C:abac_context_load_attribute_file)
     50f  int load_attribute_chunk(abac_chunk_t)
     51     load attribute certificate from an chunk
     52     (C:abac_context_load_attribute_chunk)
     53f  returns :
     54        ABAC_CERT_SUCCESS   successfully loaded
     55        ABAC_CERT_INVALID   invalid certificate (or file not found)
     56        ABAC_CERT_BAD_SIG   invalid signature
     57***/
    2758            int load_id_file(char *filename) { return abac_context_load_id_file(m_ctx, filename); }
    2859            int load_id_chunk(abac_chunk_t cert) { return abac_context_load_id_chunk(m_ctx, cert); }
     
    3061            int load_attribute_chunk(abac_chunk_t cert) { return abac_context_load_attribute_chunk(m_ctx, cert); }
    3162
     63/***
     64f  void load_directory(char *)
     65     load a directory full of certificates:
     66f       first: ${path}/*_ID.{der,pem} as identity certificates
     67               implicitly looking for ${path}/*_private.{der,pem} as
     68               the private key file
     69        last: ${path}/*_attr.xml as attribute certificates
     70      (C:abac_context_load_directory)
     71***/
    3272            void load_directory(char *path) { abac_context_load_directory(m_ctx, path); }
    3373
     74/***
     75f  std::vector<Credential> query(char *, char *, bool &)
     76     run the query:
     77        role <-?- principal
     78     returns true/false in success
     79     returns a proof upon success, partial proof on failure
     80     (C:abac_context_query)
     81     (C::abac_free_credentials_free)
     82***/
    3483
    3584            /* abac query, returns a vector of credentials on success, NULL on fail */
     
    4897                return credentials;
    4998            }
     99/***
     100f  std::vector<Credential> credentials(bool &)
     101     returns a vector of all the credentials loaded in the context
     102     (C:abac_context_credentials)
     103     (C::abac_context_credentials_free)
     104***/
    50105            std::vector<Credential> credentials() {
    51106                abac_credential_t **creds, **end;
     
    62117                return credentials;
    63118            }
     119/***
     120f  void set_nickname(char *key, char *nick)
     121     Set the nickname (value printed) for keyid.  The substitution is made
     122     in Role::short_string(Context) and when bake(Context) is called on a new
     123     attribute.
     124     (C:abac_context_set__short_string)
     125***/
    64126        void set_nickname(char *key, char *nick) {
    65127            abac_context_set_nickname(m_ctx, key, nick);
     
    71133    };
    72134
     135/***
     136ABAC::Role
     137   A Role, most calls are rarely used outside the library
     138***/
    73139    class Role {
    74140        public:
     141/***
     142f  Role()
     143     default constructor, do not use, for swig only
     144f  Role(abac_role_t*)
     145     copy constructor, used for cloning an Role
     146     (C:abac_role_dup)
     147f  Role(char *)
     148     instantiate a role from a string
     149     (C:abac_role_from_string)
     150f  Role(const Role &)
     151     copy constructor, used for cloning an Role
     152     (C:abac_role_dup)
     153f  ~Role()
     154     default destructor
     155     (C:abac_role_free)
     156***/
    75157            Role() : m_role(NULL) { } // do not use: here for swig
    76158            Role(abac_role_t *role) { m_role = abac_role_dup(role); }
     
    78160            Role(const Role &role) { m_role = abac_role_dup(role.m_role); }
    79161            ~Role() { abac_role_free(m_role); }
     162/***
     163f  bool is_principal()
     164     (C:abac_role_is_principal)
     165f  bool is_role()
     166     (C:abac_role_is_role)
     167f  bool is_linking()
     168     (C:abac_role_is_linking)
     169     indicates the type of role encoded
     170***/
    80171            bool is_principal() const { return abac_role_is_principal(m_role); }
    81172            bool is_role() const { return abac_role_is_role(m_role); }
    82173            bool is_linking() const { return abac_role_is_linking(m_role); }
    83174
     175/***
     176f  char* string()
     177     string representation of the role
     178     (C:abac_role_string)
     179***/
    84180            char *string() const { return abac_role_string(m_role); }
     181/***
     182f  char* short_string()
     183     string representation of the role
     184     (C:abac_role_short_string)
     185***/
    85186            char *short_string(Context& c) const {
    86187                return abac_role_short_string(m_role, c.m_ctx);
    87188            }
     189/***
     190f  char* linked_role()
     191     the linked role of a linking role
     192     i.e., A.r1.r2, linked_role() returns A.r1
     193     (C:abac_role_linked_role)
     194f  char* role_name()
     195     the role name of any role (the part after the last dot)
     196     (C:abac_role_role_name)
     197f  char* principal()
     198     the principal part of any role
     199     (C:abac_role_principal)
     200***/
    88201            char *linked_role() const { return abac_role_linked_role(m_role); }
    89202            char *role_name() const { return abac_role_role_name(m_role); }
     
    94207    };
    95208
     209/***
     210ABAC::Credential
     211   This is never instantiated directly. These will only ever be
     212   returned as a result of calls to Context::query or
     213   Context::credentials.
     214***/
    96215    class Credential {
    97216        public:
     217/***
     218f  Credential()
     219     default constructor, do not use, for swig only
     220f  Credential(abac_credential_t*)
     221     copy constructor, used for cloning a credential
     222     (C:abac_credential_head)
     223     (C:abac_credential_tail)
     224     (C:abac_credential_dup)
     225f  Credential(const Credential&)
     226     copy constructor, used for cloning a credential
     227     (C:abac_credential_head)
     228     (C:abac_credential_tail)
     229     (C:abac_credential_dup)
     230f  ~Credential()
     231     default destructor
     232     (C:abac_credential_free)
     233***/
    98234            Credential() : m_cred(NULL) { } // do not use: here for swig
    99235            Credential(abac_credential_t *cred) :
     
    108244                    { }
    109245            ~Credential() { abac_credential_free(m_cred); }
     246/***
     247f  Role &head()
     248     returns the head of the credential
     249f  Role &tail()
     250     returns the tail of the credential
     251***/
    110252            const Role &head() { return m_head; }
    111253            const Role &tail() { return m_tail; }
     254/***
     255f  abac_chunk_t attribute_cert()
     256     returns the attribute certificate in chunk, suitable for
     257     transmission over the network or storage in a file
     258     (C:abac_credential_attribute_cert)
     259f  abac_chunk_t issuer_cert()
     260     returns the issuer certificate in chunk, again suitable for
     261     network transmission or file storage
     262     (C:abac_credential_issuer_cert)
     263***/
    112264            abac_chunk_t attribute_cert() { return abac_credential_attribute_cert(m_cred); }
    113265            abac_chunk_t issuer_cert() { return abac_credential_issuer_cert(m_cred); }
     
    119271
    120272
     273/***
     274ABAC::ID
     275   An ID holds a principal credential. It maybe imported from an existing
     276   ID credential via external files, constructed from a streaming chunk,
     277   or instantiated on the fly
     278***/
    121279    class ID {
    122280        public:
     281/***
     282f  ID()
     283     default constructor, do not use, for swig only
     284f  ID(const ID &)
     285     copy constructor, used for cloning an ID
     286     (C:abac_id_dup)
     287f  ~ID()
     288     default destructor
     289     (C:abac_id_free)
     290***/
    123291            ID() : m_id(NULL) { } // do not use: required by swig
    124292            ID(const ID &id) { m_id = abac_id_dup(id.m_id); }
    125293            ~ID() { abac_id_free(m_id); }
    126294
     295/***
     296f  ID(char *)
     297     load an ID certificate from a file, will throw an exception
     298     if the certificate cannot be loaded
     299     (C:abac_id_from_file)
     300***/
    127301            ID(char *filename) : m_id(NULL) {
    128302                m_id = abac_id_from_file(filename);
     
    131305            }
    132306
     307/***
     308f  ID_chunk(abac_chunk_t chunk)
     309     create an ID certificate from an certificate chunk, will
     310     throw an exception if the certificate cannot be loaded
     311     (C:abac_id_from_chunk)
     312***/
    133313            ID(abac_chunk_t chunk) : m_id(NULL) {
    134314                m_id = abac_id_from_chunk(chunk);
     
    136316                    throw std::invalid_argument("Could not load ID certificate with a chunk");
    137317            }
     318/***
     319f  ID(char *,int)
     320     generates a new ID(cert&key) with the supplied CN and validity period
     321     - CN must be alphanumeric and begin with a letter
     322     - validity must be at least one second
     323     will throw an exception if either of the above is violated
     324     (C:abac_id_generate)
     325***/
    138326            ID(char *cn, int validity) : m_id(NULL) {
    139327                int ret = abac_id_generate(&m_id, cn, validity);
     
    143331                    throw std::invalid_argument("Validity must be > 0 days");
    144332            }
     333/***
     334f  void load_privkey(char *)
     335     loads the private key associated with the ID credential,
     336     will throw an exception if the key cannot be loaded
     337     (C:abac_id_privkey_from_file)
     338f  void load_privkey_chunk(abac_chunk_t)
     339     loads the private key associated with the ID credential,
     340     will throw an exception if the key cannot be loaded
     341     (C:abac_id_privkey_from_chunk)
     342f  int has_privkey()
     343     check to see if there is a privkey in this ID
     344     (C:abac_id_has_privkey)
     345***/
    145346            void load_privkey(char *filename) {
    146347                int ret = abac_id_privkey_from_file(m_id, filename);
     
    157358                return ret;
    158359            }
     360/***
     361f  char *keyid()
     362     returns the SHA1 keyid of the id cert
     363     (C:abac_id_keyid)
     364f  char *cert_filename()
     365     returns the default libabac filename for the cert.
     366     value must be freed by caller.
     367     (C:abac_id_cert_filename)
     368***/
    159369            char *keyid() { return abac_id_keyid(m_id); }
    160370            char *cert_filename() { return abac_id_cert_filename(m_id); }
     371/***
     372f  void write_cert(FILE *)
     373     writes a PEM-encoded certificate to a file handle
     374     (C:abac_id_write_cert)
     375f  void write_cert(string &)
     376     writes a PEM-encoded certificate to a file named in string
     377f  void write_cert_file(const char *)
     378     writes a PEM-encoded certificate to a file
     379f  void write_cert_name(const char *)
     380     writes a PEM-encoded certificate to a file
     381     (added to support original libcreddy users)
     382***/
    161383            void write_cert(FILE *out) { abac_id_write_cert(m_id, out); }
    162384            void write_cert(const std::string &name) {
     
    175397                fprintf(stderr,"ABAC::ID::write_cert_name is deprecated, please use ABAC::ID::write_cert_name\n");
    176398            }
     399/***
     400f  char *privkey_filename()
     401     returns the default libabac filename for the private key.
     402     value must be freed by caller.
     403     (C:abac_id_privkey_filename)
     404***/
    177405            char *privkey_filename() { return abac_id_privkey_filename(m_id); }
     406/***
     407f  void write_privkey(FILE *)
     408     write the private key to a file handle
     409     throws a std::logic_error if no private key is loaded
     410     (C:abac_id_write_privkey)
     411f  void write_privkey(string &)
     412     writes a private key to file named in string
     413f  void write_privkey_file(const char *)
     414     writes a private key to a file
     415f  void write_privkey_name(const char *)
     416     writes a private key to a file
     417     (added to support original libcreddy users)
     418***/
    178419            void write_privkey(FILE *out) {
    179420                int ret = abac_id_write_privkey(m_id, out);
     
    195436                fprintf(stderr,"ABAC::ID::write_privkey_name is deprecated, please use ABAC::ID::write_privkey_file\n");
    196437            }
     438/***
     439f  abac_chunk_t cert_chunk()
     440     returns a DER-encoded binary representation of the X.509 ID cert
     441     associated with this ID.
     442     can be passed to libabac's Context::load_id_chunk()
     443     (C:abac_id_cert_chunk)
     444f  abac_chunk_t privkey_chunk()
     445     returns a PEM-encoded binary representation of the private key
     446     associated with this ID.
     447     (C:abac_id_privkey_chunk)
     448***/
    197449            abac_chunk_t cert_chunk() { return abac_id_cert_chunk(m_id); }
    198450            abac_chunk_t privkey_chunk() { return abac_id_privkey_chunk(m_id); }
     
    204456    };
    205457
     458/***
     459ABAC::Attribute
     460   This is the attribute representation for the access policy rule
     461       LHS <- RHS
     462   The sequence of generation is to
     463       first, instantiate the object, ie, LHS (head)
     464       second, adding subject(s) to it, ie, RHS (tail)
     465       and then baking it.
     466   Only once it's baked can you access the X.509 cert.
     467   Once it's been baked you can no longer add subjects to it
     468***/
    206469    class Attribute {
    207470        public:
     471/***
     472f  Attribute()
     473     default constructor, do not use, for swig only
     474f  ~Attribute()
     475     default destructor
     476     (C:abac_attribute_free)
     477***/
    208478            Attribute() : m_attr(NULL) { } // do not use: required by swig
    209479            ~Attribute() { abac_attribute_free(m_attr); }
    210480
     481/***
     482f  Attribute(ID&, char*,int)
     483     constructor that creates an attribute policy to be signed by the issuer
     484     with the given role with a specified validity period
     485     An exception will be thrown if:
     486       - the issuer has no private key
     487       - the Head role is invalid
     488       - the validity period is invalid (must be >= 0 second)
     489       - The issuer is invalid
     490     (C:abac_attribute_create)
     491***/
    211492            Attribute(ID &issuer, char *role, int validity) : m_attr(NULL) {
    212493                int ret = abac_attribute_create(&m_attr, issuer.m_id, role, validity);
     
    222503
    223504
     505/***
     506f  bool principal(char *keyid)
     507     {keyid}
     508     validate the principal and insert into the attribute
     509     throw a std::logic_error if the cert's been baked and keyid bad
     510     (C:abac_attribute_principal)
     511f bool role(char *keyid, char *role)
     512     {keyid.role}
     513     validate the principal and role and insert into the attribute
     514     throw a std::logic_error if the cert's been baked and keyid bad
     515     (C:abac_attribute_role)
     516f bool linking_role(char *keyid, char *role, char *linked)
     517     {keyid.linked.role}
     518     validate the role and linking role and insert into the attribute
     519     throw a std::logic_error if the cert's been baked and keyid bad
     520     (C:abac_attribute_linking_role)
     521***/
    224522            bool principal(char *keyid) {
    225523                if (baked()) throw std::logic_error("Cert is already baked");
     
    234532                return abac_attribute_linking_role(m_attr, keyid, role, linked);
    235533            }
     534/***
     535f  bool bake()
     536     Generate the cert. Call this after you've added subjects to your cert.
     537     This returns false if there are no subjects
     538     This will throw an exception if the cert's already been baked.
     539     (C:abac_attribute_bake)
     540***/
    236541            bool bake() {
    237542                if (baked()) throw std::logic_error("Cert is already baked");
     
    239544            }
    240545
     546/***
     547f  bool bake(Context c)
     548     Generate the cert. Call this after you've added subjects to your cert.
     549     This returns false if there are no subjects
     550     This will throw an exception if the cert's already been baked.
     551     This version annotated the baked credential with any mnemonic names in the
     552     context.
     553     (C:abac_attribute_bake)
     554***/
    241555            bool bake(Context& c) {
    242556                if (baked()) throw std::logic_error("Cert is already baked");
     
    244558            }
    245559
     560/***
     561f  bool baked()
     562     returns true iff the certificate has been baked.
     563     (C:abac_attribute_baked)
     564***/
    246565            bool baked() { return abac_attribute_baked(m_attr); }
    247566
     567/***
     568f  set_output_format(char *fmt)
     569     {fmt}
     570     Set the attribute's output format.  Valid choices are GENIv1.0 and
     571     GENIV1.1.  Default is GENIv1.1.
     572***/
    248573            void set_output_format(char *fmt) {
    249574                abac_attribute_set_output_format(m_attr, fmt);
    250575            }
    251576
     577/***
     578f  get_output_format(char *fmt)
     579     Get the attribute's output format.  Do not delete the string/
     580***/
    252581            char *get_output_format() {
    253582                return abac_attribute_get_output_format(m_attr);
    254583            }
    255584
     585/***
     586f  void write(FILE *)
     587     write an attribute certificate in XML to an open file handle
     588     Throws an exception if the certificate isn't baked
     589     (C:abac_attribute_write)
     590f  void write(const string&)
     591     write an attribute certificate in XML to file named in string
     592f  void write_file(const char *)
     593     write an attribute certificate in XML to file
     594f  void write_name(const char *)
     595     write an attribute certificate in XML to file
     596     (added to support original libcreddy users)
     597***/
    256598            void write(FILE *out) {
    257599                int ret = abac_attribute_write(m_attr, out);
     
    273615                fprintf(stderr,"ABAC::Attribute::write_name is deprecated, please use ABAC::Attribute::write_name\n");
    274616            }
     617/***
     618f  abac_chunk_t cert_chunk()
     619     returns a XML structure of the attribute certificate in a abac_chunk_t
     620     Throws an exception if the certificate isn't baked
     621     the chunk can be passed to libabac's Context::load_attribute_chunk()
     622     (C:abac_attribute_cert_chunk)
     623***/
    275624            abac_chunk_t cert_chunk() {
    276625                abac_chunk_t ret=abac_attribute_cert_chunk(m_attr);
  • libabac/abac_attribute.c

    rafcafea r3c30b59  
    9898
    9999    attr->head_string = NULL;
    100     asprintf(&attr->head_string,"%s.%s",abac_id_keyid(issuer_id),role);
     100    int rc=asprintf(&attr->head_string,"%s.%s",abac_id_keyid(issuer_id),role);
    101101    attr->ntails = 0;
    102102    attr->tail_strings = NULL;
     
    230230        return 0;
    231231
    232     asprintf(&newcopy,"%s.%s", copy,role);
     232    int rc=asprintf(&newcopy,"%s.%s", copy,role);
    233233    free(copy);
    234234    return abac_attribute_add_tail(attr, newcopy);
     
    244244
    245245    char *newcopy=NULL;
    246     asprintf(&newcopy,"%s.%s.%s", copy,role,linked);
     246    int rc=asprintf(&newcopy,"%s.%s.%s", copy,role,linked);
    247247    free(copy);
    248248    return abac_attribute_add_tail(attr, newcopy);
  • libabac/abac_id.c

    rbec30b5 r3c30b59  
    119119    else e = endnl;
    120120
    121     asprintf(&pem,"%s%s%s",s,ptr,e);
     121    int rc=asprintf(&pem,"%s%s%s",s,ptr,e);
    122122    return pem;
    123123}
     
    365365    char *tmp=NULL;
    366366    if(kptr)  {
    367         asprintf(&tmp,"%s%s", ptr,kptr);
     367        int rc=asprintf(&tmp,"%s%s", ptr,kptr);
    368368        free(ptr);
    369369        free(kptr);
  • libabac/abac_openssl.c

    rb73c5d05 r3c30b59  
    328328   int len;
    329329   char *prompt=NULL;
     330   int rc;
    330331   if(u)
    331        asprintf(&prompt,"Enter passphrase for %s:", (char *)u);
    332        else asprintf(&prompt,"Enter passphrase :");
     332       rc=asprintf(&prompt,"Enter passphrase for %s:", (char *)u);
     333       else rc=asprintf(&prompt,"Enter passphrase :");
    333334   char *secret = malloc(PWLEN);
    334335   memset(secret, '\0', PWLEN);
  • libabac/abac_verifier.h

    rd2b198c r3c30b59  
    99void abac_verifier_deinit(void);
    1010
    11 int abac_verifier_load_id_file(abac_list_t*,char *filename, abac_keyid_mapping_t *);
    12 int abac_verifier_load_id_chunk(abac_list_t *,abac_chunk_t chunk, abac_keyid_mapping_t *);
     11int abac_verifier_load_id_file(abac_list_t*,char *filename, abac_keyid_map_t *);
     12int abac_verifier_load_id_chunk(abac_list_t *,abac_chunk_t chunk, abac_keyid_map_t *);
    1313int abac_verifier_load_attribute_cert_file(abac_list_t *,char *filename, abac_list_t *clist, abac_keyid_map_t *km);
    1414int abac_verifier_load_attribute_cert_chunk(abac_list_t *,abac_chunk_t chunk, abac_list_t  *clist, abac_keyid_map_t *km);
  • libabac/compat/readpassphrase.c

    r461541a r3c30b59  
    6363readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
    6464{
     65        ssize_t tmp;
    6566        ssize_t nr;
    6667        int input, output, save_errno, i, need_restart;
     
    136137
    137138        if (!(flags & RPP_STDIN))
    138                 (void)write(output, prompt, strlen(prompt));
     139                tmp=write(output, prompt, strlen(prompt));
    139140        end = buf + bufsiz - 1;
    140141        p = buf;
     
    155156        save_errno = errno;
    156157        if (!(term.c_lflag & ECHO))
    157                 (void)write(output, "\n", 1);
     158                tmp=write(output, "\n", 1);
    158159
    159160        /* Restore old terminal settings and signals. */
  • libabac/prover.c

    r13b087a r3c30b59  
    7171    abac_context_free(ctx);
    7272
    73     return 0;
     73    if(success) {
     74        fprintf(stderr,"returning success- 0\n");
     75        return 0;
     76    } else {
     77        fprintf(stderr,"returning failure- 1\n");
     78        return 1;
     79    }
    7480}
  • tests/Makefile

    rec550f7 r3c30b59  
    1 
    2 
    3 DIRECTORY=creddy_tests creddy_prover_tests example_scripts python_tests\
    4 scaling_tests attr_tests
    5 
    6 .PHONY : runcheck clean
    7 
    8 all: runcheck
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
     2# tests/Makefile.  Generated from Makefile.in by configure.
     3
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
     7# This Makefile.in is free software; the Free Software Foundation
     8# gives unlimited permission to copy and/or distribute it,
     9# with or without modifications, as long as this notice is preserved.
     10
     11# This program is distributed in the hope that it will be useful,
     12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     14# PARTICULAR PURPOSE.
     15
     16
     17
     18#
     19# tests directory for libabac
     20#
     21
     22pkgdatadir = $(datadir)/abac
     23pkgincludedir = $(includedir)/abac
     24pkglibdir = $(libdir)/abac
     25pkglibexecdir = $(libexecdir)/abac
     26am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
     27install_sh_DATA = $(install_sh) -c -m 644
     28install_sh_PROGRAM = $(install_sh) -c
     29install_sh_SCRIPT = $(install_sh) -c
     30INSTALL_HEADER = $(INSTALL_DATA)
     31transform = $(program_transform_name)
     32NORMAL_INSTALL = :
     33PRE_INSTALL = :
     34POST_INSTALL = :
     35NORMAL_UNINSTALL = :
     36PRE_UNINSTALL = :
     37POST_UNINSTALL = :
     38build_triplet = i686-pc-linux-gnu
     39host_triplet = i686-pc-linux-gnu
     40subdir = tests
     41DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     42ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     43am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
     44        $(top_srcdir)/m4/ax_check_xml2.m4 \
     45        $(top_srcdir)/m4/ax_check_xmlsec1.m4 \
     46        $(top_srcdir)/m4/ax_pkg_swig.m4 \
     47        $(top_srcdir)/m4/ax_python_devel.m4 \
     48        $(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
     49        $(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
     50        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
     51        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
     52        $(top_srcdir)/configure.ac
     53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     54        $(ACLOCAL_M4)
     55mkinstalldirs = $(install_sh) -d
     56CONFIG_CLEAN_FILES =
     57CONFIG_CLEAN_VPATH_FILES =
     58SOURCES =
     59DIST_SOURCES =
     60DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     61ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
     62AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
     63AR = ar
     64AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
     65AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
     66AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
     67AWK = gawk
     68AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     69AX_SWIG_PYTHON_OPT = -python
     70CC = gcc
     71CCDEPMODE = depmode=gcc3
     72CFLAGS = -g -O2
     73CPP = gcc -E
     74CPPFLAGS =
     75CXX = g++
     76CXXCPP = g++ -E
     77CXXDEPMODE = depmode=gcc3
     78CXXFLAGS = -g -O2
     79CYGPATH_W = echo
     80DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
     81DEPDIR = .deps
     82DSYMUTIL =
     83DUMPBIN =
     84ECHO_C =
     85ECHO_N = -n
     86ECHO_T =
     87EGREP = /bin/grep -E
     88EXEEXT =
     89FGREP = /bin/grep -F
     90GREP = /bin/grep
     91INSTALL = /usr/bin/install -c
     92INSTALL_DATA = ${INSTALL} -m 644
     93INSTALL_PROGRAM = ${INSTALL}
     94INSTALL_SCRIPT = ${INSTALL}
     95INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     96LD = /usr/bin/ld
     97LDFLAGS =
     98LIBOBJS =
     99LIBS =
     100LIBTOOL = $(SHELL) $(top_builddir)/libtool
     101LIPO =
     102LN_S = ln -s
     103LTLIBOBJS =
     104MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
     105MKDIR_P = /bin/mkdir -p
     106NM = /usr/bin/nm -B
     107NMEDIT =
     108OBJDUMP = objdump
     109OBJEXT = o
     110OPENSSL_INCLUDES = 
     111OPENSSL_LDFLAGS = 
     112OPENSSL_LIBS = -lssl -lcrypto 
     113OTOOL =
     114OTOOL64 =
     115PACKAGE = abac
     116PACKAGE_BUGREPORT = faber@ISI.EDU
     117PACKAGE_NAME = ABAC
     118PACKAGE_STRING = ABAC 0.1.5
     119PACKAGE_TARNAME = abac
     120PACKAGE_URL =
     121PACKAGE_VERSION = 0.1.5
     122PATH_SEPARATOR = :
     123PERL = perl
     124PKG_CONFIG = /usr/bin/pkg-config
     125PYTHON = /usr/local/bin/python
     126PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     127PYTHON_EXEC_PREFIX = ${exec_prefix}
     128PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
     129PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
     130PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
     131PYTHON_PLATFORM = linux2
     132PYTHON_PREFIX = ${prefix}
     133PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
     134PYTHON_VERSION = 2.7
     135RANLIB = ranlib
     136SED = /bin/sed
     137SET_MAKE =
     138SHELL = /bin/bash
     139SITE_PERL = /usr/local/lib/site_perl
     140STRIP = strip
     141SWIG = /usr/local/bin/swig -c++
     142SWIG_LIB = /usr/local/share/swig/2.0.4
     143VERSION = 0.1.5
     144XML2_CONFIG = /usr/bin/xml2-config
     145XML2_INCLUDES = -I/usr/include/libxml2
     146XML2_LDFLAGS = -lxml2
     147XML2_LIBS = -lxml2
     148XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
     149XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
     150XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     151XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     152abs_builddir = /home/mei/Deter/abac0-master/tests
     153abs_srcdir = /home/mei/Deter/abac0-master/tests
     154abs_top_builddir = /home/mei/Deter/abac0-master
     155abs_top_srcdir = /home/mei/Deter/abac0-master
     156ac_ct_CC = gcc
     157ac_ct_CXX = g++
     158ac_ct_DUMPBIN =
     159am__include = include
     160am__leading_dot = .
     161am__quote =
     162am__tar = ${AMTAR} chof - "$$tardir"
     163am__untar = ${AMTAR} xf -
     164bindir = ${exec_prefix}/bin
     165build = i686-pc-linux-gnu
     166build_alias =
     167build_cpu = i686
     168build_os = linux-gnu
     169build_vendor = pc
     170builddir = .
     171datadir = ${datarootdir}
     172datarootdir = ${prefix}/share
     173docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
     174dvidir = ${docdir}
     175exec_prefix = ${prefix}
     176host = i686-pc-linux-gnu
     177host_alias =
     178host_cpu = i686
     179host_os = linux-gnu
     180host_vendor = pc
     181htmldir = ${docdir}
     182includedir = ${prefix}/include
     183infodir = ${datarootdir}/info
     184install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
     185libdir = ${exec_prefix}/lib
     186libexecdir = ${exec_prefix}/libexec
     187localedir = ${datarootdir}/locale
     188localstatedir = ${prefix}/var
     189lt_ECHO = echo
     190mandir = ${datarootdir}/man
     191mkdir_p = /bin/mkdir -p
     192oldincludedir = /usr/include
     193pdfdir = ${docdir}
     194pkgpyexecdir = ${pyexecdir}/abac
     195pkgpythondir = ${pythondir}/abac
     196prefix = /usr/local
     197program_transform_name = s,x,x,
     198psdir = ${docdir}
     199pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
     200pythondir = ${prefix}/lib/python2.7/site-packages
     201sbindir = ${exec_prefix}/sbin
     202sharedstatedir = ${prefix}/com
     203srcdir = .
     204sysconfdir = ${prefix}/etc
     205target_alias =
     206top_build_prefix = ../
     207top_builddir = ..
     208top_srcdir = ..
     209INCLUDES = -I$(abs_top_srcdir)/libabac
     210LDADD = $(abs_top_builddir)/libabac/libabac.la
     211CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
     212PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
     213PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
     214PERL_ENV = PERLLIB=$(abs_top_builddir)/swig/perl:$(abs_top_builddir)/swig/perl/.libs
     215TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
     216MY_SH_ENV = env $(CREDDY_ENV) $(PROVER_ENV)
     217MY_PY_ENV = env $(PROVER_ENV) $(PYTHON_ENV)
     218MY_PL_ENV = env $(PERL_ENV)
     219DIRECTORY = example_scripts python_tests scaling_tests \
     220          creddy_tests creddy_prover_tests attr_tests
     221
     222all: all-am
     223
     224.SUFFIXES:
     225$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     226        @for dep in $?; do \
     227          case '$(am__configure_deps)' in \
     228            *$$dep*) \
     229              ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
     230                && { if test -f $@; then exit 0; else break; fi; }; \
     231              exit 1;; \
     232          esac; \
     233        done; \
     234        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
     235        $(am__cd) $(top_srcdir) && \
     236          $(AUTOMAKE) --foreign tests/Makefile
     237.PRECIOUS: Makefile
     238Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     239        @case '$?' in \
     240          *config.status*) \
     241            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     242          *) \
     243            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     244            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     245        esac;
     246
     247$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     248        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     249
     250$(top_srcdir)/configure:  $(am__configure_deps)
     251        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     252$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     253        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     254$(am__aclocal_m4_deps):
     255
     256mostlyclean-libtool:
     257        -rm -f *.lo
     258
     259clean-libtool:
     260        -rm -rf .libs _libs
     261tags: TAGS
     262TAGS:
     263
     264ctags: CTAGS
     265CTAGS:
     266
     267
     268distdir: $(DISTFILES)
     269        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     270        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     271        list='$(DISTFILES)'; \
     272          dist_files=`for file in $$list; do echo $$file; done | \
     273          sed -e "s|^$$srcdirstrip/||;t" \
     274              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
     275        case $$dist_files in \
     276          */*) $(MKDIR_P) `echo "$$dist_files" | \
     277                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
     278                           sort -u` ;; \
     279        esac; \
     280        for file in $$dist_files; do \
     281          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
     282          if test -d $$d/$$file; then \
     283            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
     284            if test -d "$(distdir)/$$file"; then \
     285              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     286            fi; \
     287            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
     288              cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
     289              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     290            fi; \
     291            cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     292          else \
     293            test -f "$(distdir)/$$file" \
     294            || cp -p $$d/$$file "$(distdir)/$$file" \
     295            || exit 1; \
     296          fi; \
     297        done
     298check-am: all-am
     299check: check-am
     300all-am: Makefile
     301installdirs:
     302install: install-am
     303install-exec: install-exec-am
     304install-data: install-data-am
     305uninstall: uninstall-am
     306
     307install-am: all-am
     308        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     309
     310installcheck: installcheck-am
     311install-strip:
     312        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     313          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     314          `test -z '$(STRIP)' || \
     315            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     316mostlyclean-generic:
     317
     318clean-generic:
     319
     320distclean-generic:
     321        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     322        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     323
     324maintainer-clean-generic:
     325        @echo "This command is intended for maintainers to use"
     326        @echo "it deletes files that may require special tools to rebuild."
     327clean-am: clean-generic clean-libtool clean-local mostlyclean-am
     328
     329distclean: distclean-am
     330        -rm -f Makefile
     331distclean-am: clean-am distclean-generic
     332
     333dvi: dvi-am
     334
     335dvi-am:
     336
     337html: html-am
     338
     339html-am:
     340
     341info: info-am
     342
     343info-am:
     344
     345install-data-am:
     346
     347install-dvi: install-dvi-am
     348
     349install-dvi-am:
     350
     351install-exec-am:
     352
     353install-html: install-html-am
     354
     355install-html-am:
     356
     357install-info: install-info-am
     358
     359install-info-am:
     360
     361install-man:
     362
     363install-pdf: install-pdf-am
     364
     365install-pdf-am:
     366
     367install-ps: install-ps-am
     368
     369install-ps-am:
     370
     371installcheck-am:
     372
     373maintainer-clean: maintainer-clean-am
     374        -rm -f Makefile
     375maintainer-clean-am: distclean-am maintainer-clean-generic
     376
     377mostlyclean: mostlyclean-am
     378
     379mostlyclean-am: mostlyclean-generic mostlyclean-libtool
     380
     381pdf: pdf-am
     382
     383pdf-am:
     384
     385ps: ps-am
     386
     387ps-am:
     388
     389uninstall-am:
     390
     391.MAKE: install-am install-strip
     392
     393.PHONY: all all-am check check-am clean clean-generic clean-libtool \
     394        clean-local distclean distclean-generic distclean-libtool \
     395        distdir dvi dvi-am html html-am info info-am install \
     396        install-am install-data install-data-am install-dvi \
     397        install-dvi-am install-exec install-exec-am install-html \
     398        install-html-am install-info install-info-am install-man \
     399        install-pdf install-pdf-am install-ps install-ps-am \
     400        install-strip installcheck installcheck-am installdirs \
     401        maintainer-clean maintainer-clean-generic mostlyclean \
     402        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
     403        uninstall uninstall-am
     404
     405
     406.PHONY: clean clean-local check_sh_env check_py_env tests
     407all: check_pl_env check_sh_env check_py_env tests
     408
     409tests:
     410        @touch result
     411        @for i in $(DIRECTORY); do \
     412          here=`pwd`; \
     413          cd $$i; \
     414          make -s runcheck | tee -a $$here/result; \
     415          cd $$here; \
     416        done
     417
     418check_sh_env:
     419        @rc=`$(MY_SH_ENV) ./test_util.sh`; \
     420        if [ $$? -eq 0 ]; then \
     421          echo "sh_env, okay"; \
     422        else \
     423          echo "sh_env, not okay"; \
     424          echo "perhap you did not configure&build libabac's c api??"; \
     425        fi
     426
     427check_py_env:
     428        @rc=`$(MY_PY_ENV) ./test_util.py`; \
     429        if [ $$? -eq 0 ]; then \
     430          echo "py_env, okay"; \
     431        else \
     432          echo "py_env, not okay"; \
     433          echo "perhap you did not configure&build libabac's swig/python api??"; \
     434        fi
     435
     436check_pl_env:
     437        @rc=`$(MY_PL_ENV) ./test_util.pl`; \
     438        if [ $$? -eq 0 ]; then \
     439          echo "pl_env, okay"; \
     440        else \
     441          echo "pl_env, not okay"; \
     442          echo "perhap you did not configure&build libabac's swig/perl api??"; \
     443        fi
    9444
    10445clean:
    11         @printf "\n ==> make CLEAN \n"
    12         @for i in $(DIRECTORY); do \
    13         here=`pwd`; \
    14         cd $$i; \
    15         make -s clean; \
    16         cd $$here; \
    17         done;
    18 
    19 runcheck:
    20         @make -s clean
    21         @printf "\n ==> make TESTS \n"
    22         @for i in $(DIRECTORY); do \
    23         here=`pwd`; \
    24         cd $$i; \
    25         make -s runcheck; \
    26         cd $$here; \
    27         done;
    28 
     446        for i in $(DIRECTORY); do \
     447          here=`pwd`; \
     448          cd $$i; \
     449          make clean; \
     450          cd $$here; \
     451        done
     452        rm -rf result error
     453        rm -rf test_util.pyc
     454
     455clean-local:
     456        rm -rf result error
     457        rm -rf test_util.pyc
     458
     459# Tell versions [3.59,3.63) of GNU make to not export all variables.
     460# Otherwise a system limit (for SysV at least) may be exceeded.
     461.NOEXPORT:
  • tests/attr_tests/Makefile

    rec550f7 r3c30b59  
    1 
    2 .PHONY : runcheck clean
    3 runcheck: $(DIRECTORY)
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
     2# tests/attr_tests/Makefile.  Generated from Makefile.in by configure.
     3
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
     7# This Makefile.in is free software; the Free Software Foundation
     8# gives unlimited permission to copy and/or distribute it,
     9# with or without modifications, as long as this notice is preserved.
     10
     11# This program is distributed in the hope that it will be useful,
     12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     14# PARTICULAR PURPOSE.
     15
     16
     17
     18#
     19# attr_tests
     20#
     21
     22pkgdatadir = $(datadir)/abac
     23pkgincludedir = $(includedir)/abac
     24pkglibdir = $(libdir)/abac
     25pkglibexecdir = $(libexecdir)/abac
     26am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
     27install_sh_DATA = $(install_sh) -c -m 644
     28install_sh_PROGRAM = $(install_sh) -c
     29install_sh_SCRIPT = $(install_sh) -c
     30INSTALL_HEADER = $(INSTALL_DATA)
     31transform = $(program_transform_name)
     32NORMAL_INSTALL = :
     33PRE_INSTALL = :
     34POST_INSTALL = :
     35NORMAL_UNINSTALL = :
     36PRE_UNINSTALL = :
     37POST_UNINSTALL = :
     38build_triplet = i686-pc-linux-gnu
     39host_triplet = i686-pc-linux-gnu
     40subdir = tests/attr_tests
     41DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     42ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     43am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
     44        $(top_srcdir)/m4/ax_check_xml2.m4 \
     45        $(top_srcdir)/m4/ax_check_xmlsec1.m4 \
     46        $(top_srcdir)/m4/ax_pkg_swig.m4 \
     47        $(top_srcdir)/m4/ax_python_devel.m4 \
     48        $(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
     49        $(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
     50        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
     51        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
     52        $(top_srcdir)/configure.ac
     53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     54        $(ACLOCAL_M4)
     55mkinstalldirs = $(install_sh) -d
     56CONFIG_CLEAN_FILES =
     57CONFIG_CLEAN_VPATH_FILES =
     58SOURCES =
     59DIST_SOURCES =
     60DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     61ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
     62AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
     63AR = ar
     64AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
     65AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
     66AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
     67AWK = gawk
     68AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     69AX_SWIG_PYTHON_OPT = -python
     70CC = gcc
     71CCDEPMODE = depmode=gcc3
     72CFLAGS = -g -O2
     73CPP = gcc -E
     74CPPFLAGS =
     75CXX = g++
     76CXXCPP = g++ -E
     77CXXDEPMODE = depmode=gcc3
     78CXXFLAGS = -g -O2
     79CYGPATH_W = echo
     80DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
     81DEPDIR = .deps
     82DSYMUTIL =
     83DUMPBIN =
     84ECHO_C =
     85ECHO_N = -n
     86ECHO_T =
     87EGREP = /bin/grep -E
     88EXEEXT =
     89FGREP = /bin/grep -F
     90GREP = /bin/grep
     91INSTALL = /usr/bin/install -c
     92INSTALL_DATA = ${INSTALL} -m 644
     93INSTALL_PROGRAM = ${INSTALL}
     94INSTALL_SCRIPT = ${INSTALL}
     95INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     96LD = /usr/bin/ld
     97LDFLAGS =
     98LIBOBJS =
     99LIBS =
     100LIBTOOL = $(SHELL) $(top_builddir)/libtool
     101LIPO =
     102LN_S = ln -s
     103LTLIBOBJS =
     104MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
     105MKDIR_P = /bin/mkdir -p
     106NM = /usr/bin/nm -B
     107NMEDIT =
     108OBJDUMP = objdump
     109OBJEXT = o
     110OPENSSL_INCLUDES = 
     111OPENSSL_LDFLAGS = 
     112OPENSSL_LIBS = -lssl -lcrypto 
     113OTOOL =
     114OTOOL64 =
     115PACKAGE = abac
     116PACKAGE_BUGREPORT = faber@ISI.EDU
     117PACKAGE_NAME = ABAC
     118PACKAGE_STRING = ABAC 0.1.5
     119PACKAGE_TARNAME = abac
     120PACKAGE_URL =
     121PACKAGE_VERSION = 0.1.5
     122PATH_SEPARATOR = :
     123PERL = perl
     124PKG_CONFIG = /usr/bin/pkg-config
     125PYTHON = /usr/local/bin/python
     126PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     127PYTHON_EXEC_PREFIX = ${exec_prefix}
     128PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
     129PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
     130PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
     131PYTHON_PLATFORM = linux2
     132PYTHON_PREFIX = ${prefix}
     133PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
     134PYTHON_VERSION = 2.7
     135RANLIB = ranlib
     136SED = /bin/sed
     137SET_MAKE =
     138SHELL = /bin/bash
     139SITE_PERL = /usr/local/lib/site_perl
     140STRIP = strip
     141SWIG = /usr/local/bin/swig -c++
     142SWIG_LIB = /usr/local/share/swig/2.0.4
     143VERSION = 0.1.5
     144XML2_CONFIG = /usr/bin/xml2-config
     145XML2_INCLUDES = -I/usr/include/libxml2
     146XML2_LDFLAGS = -lxml2
     147XML2_LIBS = -lxml2
     148XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
     149XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
     150XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     151XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     152abs_builddir = /home/mei/Deter/abac0-master/tests/attr_tests
     153abs_srcdir = /home/mei/Deter/abac0-master/tests/attr_tests
     154abs_top_builddir = /home/mei/Deter/abac0-master
     155abs_top_srcdir = /home/mei/Deter/abac0-master
     156ac_ct_CC = gcc
     157ac_ct_CXX = g++
     158ac_ct_DUMPBIN =
     159am__include = include
     160am__leading_dot = .
     161am__quote =
     162am__tar = ${AMTAR} chof - "$$tardir"
     163am__untar = ${AMTAR} xf -
     164bindir = ${exec_prefix}/bin
     165build = i686-pc-linux-gnu
     166build_alias =
     167build_cpu = i686
     168build_os = linux-gnu
     169build_vendor = pc
     170builddir = .
     171datadir = ${datarootdir}
     172datarootdir = ${prefix}/share
     173docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
     174dvidir = ${docdir}
     175exec_prefix = ${prefix}
     176host = i686-pc-linux-gnu
     177host_alias =
     178host_cpu = i686
     179host_os = linux-gnu
     180host_vendor = pc
     181htmldir = ${docdir}
     182includedir = ${prefix}/include
     183infodir = ${datarootdir}/info
     184install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
     185libdir = ${exec_prefix}/lib
     186libexecdir = ${exec_prefix}/libexec
     187localedir = ${datarootdir}/locale
     188localstatedir = ${prefix}/var
     189lt_ECHO = echo
     190mandir = ${datarootdir}/man
     191mkdir_p = /bin/mkdir -p
     192oldincludedir = /usr/include
     193pdfdir = ${docdir}
     194pkgpyexecdir = ${pyexecdir}/abac
     195pkgpythondir = ${pythondir}/abac
     196prefix = /usr/local
     197program_transform_name = s,x,x,
     198psdir = ${docdir}
     199pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
     200pythondir = ${prefix}/lib/python2.7/site-packages
     201sbindir = ${exec_prefix}/sbin
     202sharedstatedir = ${prefix}/com
     203srcdir = .
     204sysconfdir = ${prefix}/etc
     205target_alias =
     206top_build_prefix = ../../
     207top_builddir = ../..
     208top_srcdir = ../..
     209INCLUDES = -I$(abs_top_srcdir)/libabac
     210LDADD = $(abs_top_builddir)/libabac/libabac.la
     211CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
     212PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
     213TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
     214MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
     215all: all-am
     216
     217.SUFFIXES:
     218$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     219        @for dep in $?; do \
     220          case '$(am__configure_deps)' in \
     221            *$$dep*) \
     222              ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
     223                && { if test -f $@; then exit 0; else break; fi; }; \
     224              exit 1;; \
     225          esac; \
     226        done; \
     227        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/attr_tests/Makefile'; \
     228        $(am__cd) $(top_srcdir) && \
     229          $(AUTOMAKE) --foreign tests/attr_tests/Makefile
     230.PRECIOUS: Makefile
     231Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     232        @case '$?' in \
     233          *config.status*) \
     234            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     235          *) \
     236            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     237            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     238        esac;
     239
     240$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     241        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     242
     243$(top_srcdir)/configure:  $(am__configure_deps)
     244        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     245$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     246        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     247$(am__aclocal_m4_deps):
     248
     249mostlyclean-libtool:
     250        -rm -f *.lo
     251
     252clean-libtool:
     253        -rm -rf .libs _libs
     254tags: TAGS
     255TAGS:
     256
     257ctags: CTAGS
     258CTAGS:
     259
     260
     261distdir: $(DISTFILES)
     262        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     263        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     264        list='$(DISTFILES)'; \
     265          dist_files=`for file in $$list; do echo $$file; done | \
     266          sed -e "s|^$$srcdirstrip/||;t" \
     267              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
     268        case $$dist_files in \
     269          */*) $(MKDIR_P) `echo "$$dist_files" | \
     270                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
     271                           sort -u` ;; \
     272        esac; \
     273        for file in $$dist_files; do \
     274          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
     275          if test -d $$d/$$file; then \
     276            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
     277            if test -d "$(distdir)/$$file"; then \
     278              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     279            fi; \
     280            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
     281              cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
     282              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     283            fi; \
     284            cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     285          else \
     286            test -f "$(distdir)/$$file" \
     287            || cp -p $$d/$$file "$(distdir)/$$file" \
     288            || exit 1; \
     289          fi; \
     290        done
     291check-am: all-am
     292check: check-am
     293all-am: Makefile
     294installdirs:
     295install: install-am
     296install-exec: install-exec-am
     297install-data: install-data-am
     298uninstall: uninstall-am
     299
     300install-am: all-am
     301        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     302
     303installcheck: installcheck-am
     304install-strip:
     305        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     306          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     307          `test -z '$(STRIP)' || \
     308            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     309mostlyclean-generic:
     310
     311clean-generic:
     312
     313distclean-generic:
     314        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     315        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     316
     317maintainer-clean-generic:
     318        @echo "This command is intended for maintainers to use"
     319        @echo "it deletes files that may require special tools to rebuild."
     320clean-am: clean-generic clean-libtool clean-local mostlyclean-am
     321
     322distclean: distclean-am
     323        -rm -f Makefile
     324distclean-am: clean-am distclean-generic
     325
     326dvi: dvi-am
     327
     328dvi-am:
     329
     330html: html-am
     331
     332html-am:
     333
     334info: info-am
     335
     336info-am:
     337
     338install-data-am:
     339
     340install-dvi: install-dvi-am
     341
     342install-dvi-am:
     343
     344install-exec-am:
     345
     346install-html: install-html-am
     347
     348install-html-am:
     349
     350install-info: install-info-am
     351
     352install-info-am:
     353
     354install-man:
     355
     356install-pdf: install-pdf-am
     357
     358install-pdf-am:
     359
     360install-ps: install-ps-am
     361
     362install-ps-am:
     363
     364installcheck-am:
     365
     366maintainer-clean: maintainer-clean-am
     367        -rm -f Makefile
     368maintainer-clean-am: distclean-am maintainer-clean-generic
     369
     370mostlyclean: mostlyclean-am
     371
     372mostlyclean-am: mostlyclean-generic mostlyclean-libtool
     373
     374pdf: pdf-am
     375
     376pdf-am:
     377
     378ps: ps-am
     379
     380ps-am:
     381
     382uninstall-am:
     383
     384.MAKE: install-am install-strip
     385
     386.PHONY: all all-am check check-am clean clean-generic clean-libtool \
     387        clean-local distclean distclean-generic distclean-libtool \
     388        distdir dvi dvi-am html html-am info info-am install \
     389        install-am install-data install-data-am install-dvi \
     390        install-dvi-am install-exec install-exec-am install-html \
     391        install-html-am install-info install-info-am install-man \
     392        install-pdf install-pdf-am install-ps install-ps-am \
     393        install-strip installcheck installcheck-am installdirs \
     394        maintainer-clean maintainer-clean-generic mostlyclean \
     395        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
     396        uninstall uninstall-am
     397
     398
     399.PHONY: runcheck clean-local setup
     400
     401all:runcheck
     402
     403runcheck: setup.sh
     404        @make clean
     405        @echo 'running libabac ATTRS testing...' | tee result
     406        @touch error
     407        @$(MY_ENV) ./setup.sh
     408        @($(MY_ENV) ./show.sh |tee -a result |grep BAD >> ../error; cd .)
     409        @if test -f error ; \
     410          then \
     411            (if test `cat error | wc -l ` -eq 0 ; \
     412              then echo "   PASSED"; \
     413              else (echo "   ERROR!!!"; cat error;); \
     414            fi); \
     415          else echo "   PASSED"; \
     416        fi
    4417
    5418clean:
    6         rm -rf *.out *.xml
    7         rm -rf result
    8 
    9 runcheck:
    10         @echo 'running libabac ATTRS testing...'
    11         @./run_test > result 2>/dev/null; \
    12         if test -f result && test `diff -q result.save result |wc -l ` -eq 0 ; \
    13         then echo "   PASSED"; \
    14         else echo "   ERROR:got changes!!!"; \
    15         fi
     419        @rm -rf *.xml *.pem error result
     420
     421clean-local:
     422        @rm -rf *.xml *.pem error result
     423
     424# Tell versions [3.59,3.63) of GNU make to not export all variables.
     425# Otherwise a system limit (for SysV at least) may be exceeded.
     426.NOEXPORT:
  • tests/attr_tests/README

    rec550f7 r3c30b59  
    33
    44privilege_attr.xml,  a valid self-signed priviledge GENI attribute credential
    5                      with multiple attribute rules
     5                     with multiple(6) attribute rules
    66
    77abac_attr.xml,  a valid self-signed abac attribute credential with a single
    88                attribute rule
    99
     10not_ss.xml, a valid none self-signed abac attribute credential with a single
     11            attribute rule
    1012
  • tests/attr_tests/show.sh

    rec550f7 r3c30b59  
    11#!/bin/sh
     2#show.sh
    23
    3 pwd=`pwd`
    4 eloc=`which creddy | sed 's/\/creddy//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: creddy is not in the search path!!!"
    7   exit 1
    8 fi
     4. ${TESTDIR}/test_util.sh
    95
    10 $eloc/creddy --roles --cert $1
     6#expect 1 rule
     7runCTest "attr_tests/show.sh" "test1" \
     8"$eloc/creddy --roles --cert abac_attr.xml" \
     90 "show a V0 abac attribute-1 rule" "<-" 1
     10
     11#expect 6 rule
     12runCTest "attr_tests/show.sh" "test2" \
     13"$eloc/creddy --roles --cert privilege_attr.xml" \
     140 "show a V0 GENI privilege attribute-6 rules" "<-" 6
     15
     16#expect 1 rule
     17runCTest "attr_tests/show.sh" "test3" \
     18"$eloc/creddy --roles --cert not_ss.xml" \
     190 "show a V0 abac not self signed attribute-1 rule" "<-" 1
     20
     21
  • tests/creddy_prover_tests/Makefile

    rd6d44fe r3c30b59  
    1 
    2 DIRECTORY= acme_rockets_intersection_rt0 acme_rockets_rt0 experiment_create_rt0 ice_cream_rt0
    3 
    4 .PHONY : setup runcheck clean
    5 runcheck: $(DIRECTORY)
    6 
    7 clean:
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
     2# tests/creddy_prover_tests/Makefile.  Generated from Makefile.in by configure.
     3
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
     7# This Makefile.in is free software; the Free Software Foundation
     8# gives unlimited permission to copy and/or distribute it,
     9# with or without modifications, as long as this notice is preserved.
     10
     11# This program is distributed in the hope that it will be useful,
     12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     14# PARTICULAR PURPOSE.
     15
     16
     17
     18pkgdatadir = $(datadir)/abac
     19pkgincludedir = $(includedir)/abac
     20pkglibdir = $(libdir)/abac
     21pkglibexecdir = $(libexecdir)/abac
     22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
     23install_sh_DATA = $(install_sh) -c -m 644
     24install_sh_PROGRAM = $(install_sh) -c
     25install_sh_SCRIPT = $(install_sh) -c
     26INSTALL_HEADER = $(INSTALL_DATA)
     27transform = $(program_transform_name)
     28NORMAL_INSTALL = :
     29PRE_INSTALL = :
     30POST_INSTALL = :
     31NORMAL_UNINSTALL = :
     32PRE_UNINSTALL = :
     33POST_UNINSTALL = :
     34build_triplet = i686-pc-linux-gnu
     35host_triplet = i686-pc-linux-gnu
     36subdir = tests/creddy_prover_tests
     37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     39am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
     40        $(top_srcdir)/m4/ax_check_xml2.m4 \
     41        $(top_srcdir)/m4/ax_check_xmlsec1.m4 \
     42        $(top_srcdir)/m4/ax_pkg_swig.m4 \
     43        $(top_srcdir)/m4/ax_python_devel.m4 \
     44        $(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
     45        $(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
     46        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
     47        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
     48        $(top_srcdir)/configure.ac
     49am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     50        $(ACLOCAL_M4)
     51mkinstalldirs = $(install_sh) -d
     52CONFIG_CLEAN_FILES =
     53CONFIG_CLEAN_VPATH_FILES =
     54SOURCES =
     55DIST_SOURCES =
     56DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     57ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
     58AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
     59AR = ar
     60AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
     61AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
     62AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
     63AWK = gawk
     64AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     65AX_SWIG_PYTHON_OPT = -python
     66CC = gcc
     67CCDEPMODE = depmode=gcc3
     68CFLAGS = -g -O2
     69CPP = gcc -E
     70CPPFLAGS =
     71CXX = g++
     72CXXCPP = g++ -E
     73CXXDEPMODE = depmode=gcc3
     74CXXFLAGS = -g -O2
     75CYGPATH_W = echo
     76DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
     77DEPDIR = .deps
     78DSYMUTIL =
     79DUMPBIN =
     80ECHO_C =
     81ECHO_N = -n
     82ECHO_T =
     83EGREP = /bin/grep -E
     84EXEEXT =
     85FGREP = /bin/grep -F
     86GREP = /bin/grep
     87INSTALL = /usr/bin/install -c
     88INSTALL_DATA = ${INSTALL} -m 644
     89INSTALL_PROGRAM = ${INSTALL}
     90INSTALL_SCRIPT = ${INSTALL}
     91INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     92LD = /usr/bin/ld
     93LDFLAGS =
     94LIBOBJS =
     95LIBS =
     96LIBTOOL = $(SHELL) $(top_builddir)/libtool
     97LIPO =
     98LN_S = ln -s
     99LTLIBOBJS =
     100MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
     101MKDIR_P = /bin/mkdir -p
     102NM = /usr/bin/nm -B
     103NMEDIT =
     104OBJDUMP = objdump
     105OBJEXT = o
     106OPENSSL_INCLUDES = 
     107OPENSSL_LDFLAGS = 
     108OPENSSL_LIBS = -lssl -lcrypto 
     109OTOOL =
     110OTOOL64 =
     111PACKAGE = abac
     112PACKAGE_BUGREPORT = faber@ISI.EDU
     113PACKAGE_NAME = ABAC
     114PACKAGE_STRING = ABAC 0.1.5
     115PACKAGE_TARNAME = abac
     116PACKAGE_URL =
     117PACKAGE_VERSION = 0.1.5
     118PATH_SEPARATOR = :
     119PERL = perl
     120PKG_CONFIG = /usr/bin/pkg-config
     121PYTHON = /usr/local/bin/python
     122PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     123PYTHON_EXEC_PREFIX = ${exec_prefix}
     124PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
     125PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
     126PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
     127PYTHON_PLATFORM = linux2
     128PYTHON_PREFIX = ${prefix}
     129PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
     130PYTHON_VERSION = 2.7
     131RANLIB = ranlib
     132SED = /bin/sed
     133SET_MAKE =
     134SHELL = /bin/bash
     135SITE_PERL = /usr/local/lib/site_perl
     136STRIP = strip
     137SWIG = /usr/local/bin/swig -c++
     138SWIG_LIB = /usr/local/share/swig/2.0.4
     139VERSION = 0.1.5
     140XML2_CONFIG = /usr/bin/xml2-config
     141XML2_INCLUDES = -I/usr/include/libxml2
     142XML2_LDFLAGS = -lxml2
     143XML2_LIBS = -lxml2
     144XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
     145XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
     146XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     147XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     148abs_builddir = /home/mei/Deter/abac0-master/tests/creddy_prover_tests
     149abs_srcdir = /home/mei/Deter/abac0-master/tests/creddy_prover_tests
     150abs_top_builddir = /home/mei/Deter/abac0-master
     151abs_top_srcdir = /home/mei/Deter/abac0-master
     152ac_ct_CC = gcc
     153ac_ct_CXX = g++
     154ac_ct_DUMPBIN =
     155am__include = include
     156am__leading_dot = .
     157am__quote =
     158am__tar = ${AMTAR} chof - "$$tardir"
     159am__untar = ${AMTAR} xf -
     160bindir = ${exec_prefix}/bin
     161build = i686-pc-linux-gnu
     162build_alias =
     163build_cpu = i686
     164build_os = linux-gnu
     165build_vendor = pc
     166builddir = .
     167datadir = ${datarootdir}
     168datarootdir = ${prefix}/share
     169docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
     170dvidir = ${docdir}
     171exec_prefix = ${prefix}
     172host = i686-pc-linux-gnu
     173host_alias =
     174host_cpu = i686
     175host_os = linux-gnu
     176host_vendor = pc
     177htmldir = ${docdir}
     178includedir = ${prefix}/include
     179infodir = ${datarootdir}/info
     180install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
     181libdir = ${exec_prefix}/lib
     182libexecdir = ${exec_prefix}/libexec
     183localedir = ${datarootdir}/locale
     184localstatedir = ${prefix}/var
     185lt_ECHO = echo
     186mandir = ${datarootdir}/man
     187mkdir_p = /bin/mkdir -p
     188oldincludedir = /usr/include
     189pdfdir = ${docdir}
     190pkgpyexecdir = ${pyexecdir}/abac
     191pkgpythondir = ${pythondir}/abac
     192prefix = /usr/local
     193program_transform_name = s,x,x,
     194psdir = ${docdir}
     195pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
     196pythondir = ${prefix}/lib/python2.7/site-packages
     197sbindir = ${exec_prefix}/sbin
     198sharedstatedir = ${prefix}/com
     199srcdir = .
     200sysconfdir = ${prefix}/etc
     201target_alias =
     202top_build_prefix = ../../
     203top_builddir = ../..
     204top_srcdir = ../..
     205
     206#
     207# creddy_prover_tests
     208#
     209INCLUDES = -I$(abs_top_srcdir)/libabac
     210LDADD = $(abs_top_builddir)/libabac/libabac.la
     211CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
     212PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
     213TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
     214MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
     215DIRECTORY = acme_rockets_intersection_rt0 acme_rockets_rt0 \
     216          experiment_create_rt0 ice_cream_rt0
     217
     218all: all-am
     219
     220.SUFFIXES:
     221$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     222        @for dep in $?; do \
     223          case '$(am__configure_deps)' in \
     224            *$$dep*) \
     225              ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
     226                && { if test -f $@; then exit 0; else break; fi; }; \
     227              exit 1;; \
     228          esac; \
     229        done; \
     230        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/creddy_prover_tests/Makefile'; \
     231        $(am__cd) $(top_srcdir) && \
     232          $(AUTOMAKE) --foreign tests/creddy_prover_tests/Makefile
     233.PRECIOUS: Makefile
     234Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     235        @case '$?' in \
     236          *config.status*) \
     237            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     238          *) \
     239            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     240            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     241        esac;
     242
     243$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     244        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     245
     246$(top_srcdir)/configure:  $(am__configure_deps)
     247        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     248$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     249        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     250$(am__aclocal_m4_deps):
     251
     252mostlyclean-libtool:
     253        -rm -f *.lo
     254
     255clean-libtool:
     256        -rm -rf .libs _libs
     257tags: TAGS
     258TAGS:
     259
     260ctags: CTAGS
     261CTAGS:
     262
     263
     264distdir: $(DISTFILES)
     265        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     266        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     267        list='$(DISTFILES)'; \
     268          dist_files=`for file in $$list; do echo $$file; done | \
     269          sed -e "s|^$$srcdirstrip/||;t" \
     270              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
     271        case $$dist_files in \
     272          */*) $(MKDIR_P) `echo "$$dist_files" | \
     273                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
     274                           sort -u` ;; \
     275        esac; \
     276        for file in $$dist_files; do \
     277          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
     278          if test -d $$d/$$file; then \
     279            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
     280            if test -d "$(distdir)/$$file"; then \
     281              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     282            fi; \
     283            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
     284              cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
     285              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     286            fi; \
     287            cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     288          else \
     289            test -f "$(distdir)/$$file" \
     290            || cp -p $$d/$$file "$(distdir)/$$file" \
     291            || exit 1; \
     292          fi; \
     293        done
     294check-am: all-am
     295check: check-am
     296all-am: Makefile
     297installdirs:
     298install: install-am
     299install-exec: install-exec-am
     300install-data: install-data-am
     301uninstall: uninstall-am
     302
     303install-am: all-am
     304        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     305
     306installcheck: installcheck-am
     307install-strip:
     308        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     309          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     310          `test -z '$(STRIP)' || \
     311            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     312mostlyclean-generic:
     313
     314clean-generic:
     315
     316distclean-generic:
     317        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     318        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     319
     320maintainer-clean-generic:
     321        @echo "This command is intended for maintainers to use"
     322        @echo "it deletes files that may require special tools to rebuild."
     323clean-am: clean-generic clean-libtool clean-local mostlyclean-am
     324
     325distclean: distclean-am
     326        -rm -f Makefile
     327distclean-am: clean-am distclean-generic
     328
     329dvi: dvi-am
     330
     331dvi-am:
     332
     333html: html-am
     334
     335html-am:
     336
     337info: info-am
     338
     339info-am:
     340
     341install-data-am:
     342
     343install-dvi: install-dvi-am
     344
     345install-dvi-am:
     346
     347install-exec-am:
     348
     349install-html: install-html-am
     350
     351install-html-am:
     352
     353install-info: install-info-am
     354
     355install-info-am:
     356
     357install-man:
     358
     359install-pdf: install-pdf-am
     360
     361install-pdf-am:
     362
     363install-ps: install-ps-am
     364
     365install-ps-am:
     366
     367installcheck-am:
     368
     369maintainer-clean: maintainer-clean-am
     370        -rm -f Makefile
     371maintainer-clean-am: distclean-am maintainer-clean-generic
     372
     373mostlyclean: mostlyclean-am
     374
     375mostlyclean-am: mostlyclean-generic mostlyclean-libtool
     376
     377pdf: pdf-am
     378
     379pdf-am:
     380
     381ps: ps-am
     382
     383ps-am:
     384
     385uninstall-am:
     386
     387.MAKE: install-am install-strip
     388
     389.PHONY: all all-am check check-am clean clean-generic clean-libtool \
     390        clean-local distclean distclean-generic distclean-libtool \
     391        distdir dvi dvi-am html html-am info info-am install \
     392        install-am install-data install-data-am install-dvi \
     393        install-dvi-am install-exec install-exec-am install-html \
     394        install-html-am install-info install-info-am install-man \
     395        install-pdf install-pdf-am install-ps install-ps-am \
     396        install-strip installcheck installcheck-am installdirs \
     397        maintainer-clean maintainer-clean-generic mostlyclean \
     398        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
     399        uninstall uninstall-am
     400
     401
     402.PHONY : clean clean-local runcheck
     403all: runcheck
     404
     405runcheck :
     406        @echo 'running libabac CREDDY_PROVER testing...' | tee result
     407        @touch error
    8408        @for i in $(DIRECTORY); do \
    9         here=`pwd`; \
    10         cd $$i; \
    11         rm -rf *.xml *.pem *.out *.log; \
    12         cd $$here; \
    13         done
    14         @rm -rf result
    15 
    16 runcheck:
    17         @echo 'running libabac CREDDY/ABAC_PROVER testing...'
    18         @rm -rf result
     409          here=`pwd`; \
     410          cd $$i; \
     411          printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \
     412          $(MY_ENV) ./README 1>/dev/null 2>&1; \
     413          $(MY_ENV) ./run_query |tee -a $$here/result |grep BAD >> $$here/error; \
     414          cd $$here; \
     415        done
     416        @if test -f error ; \
     417          then \
     418            (if test `cat error | wc -l ` -eq 0 ; \
     419              then echo "   PASSED"; \
     420              else (echo "   ERROR!!!"; cat error;) \
     421            fi) \
     422          else echo "   PASSED"; \
     423        fi
     424
     425clean :
    19426        @for i in $(DIRECTORY); do \
    20         here=`pwd`; \
    21         cd $$i; \
    22         printf "\n ==> RUN on %s\n" "$$i" >> ../result; \
    23         ./README >> ../result 2>/dev/null; \
    24         ./run_query >> ../result 2>/dev/null; \
    25         cd $$here; \
     427          here=`pwd`; \
     428          cd $$i; \
     429          rm -rf *.pem *.xml; \
     430          cd $$here; \
    26431        done
    27 ## since can not check the everchanging keyid values, we just do a char count check..
    28         @if test -f result && test `cat result|wc -c` -eq 6112 ; \
    29         then echo "   PASSED"; \
    30         else echo "   ERROR:got changes!!!"; \
    31         fi
    32 
     432        @rm -rf result error
     433
     434clean-local:
     435        @rm -rf result error
     436
     437# Tell versions [3.59,3.63) of GNU make to not export all variables.
     438# Otherwise a system limit (for SysV at least) may be exceeded.
     439.NOEXPORT:
  • tests/creddy_prover_tests/acme_rockets_intersection_rt0/README

    rec550f7 r3c30b59  
    3434rm -rf *.xml *.pem
    3535
    36 creddy --generate --cn Acme
     36. ${TESTDIR}/test_util.sh
    3737
    38 creddy --generate --cn WarnerBros
     38$eloc/creddy --generate --cn Acme
    3939
    40 creddy --generate --cn Coyote
     40$eloc/creddy --generate --cn WarnerBros
    4141
    42 creddy --generate --cn Batman
     42$eloc/creddy --generate --cn Coyote
    4343
    44 creddy --attribute \
     44$eloc/creddy --generate --cn Batman
     45
     46$eloc/creddy --attribute \
    4547       --issuer Acme_ID.pem --key Acme_private.pem --role buy_rockets \
    4648       --subject-cert Acme_ID.pem --subject-role preferred_customer \
     
    4850       --out Acme_buy_rockets__Acme_preferred_customer_and_WarnerBros_character_attr.xml
    4951
    50 creddy --attribute \
     52$eloc/creddy --attribute \
    5153       --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \
    5254       --subject-cert Coyote_ID.pem \
    5355       --out Acme_preferred_customer__Coyote_attr.xml
    5456
    55 creddy --attribute \
     57$eloc/creddy --attribute \
    5658       --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \
    5759       --subject-cert Batman_ID.pem \
    5860       --out Acme_preferred_customer__Batman_attr.xml
    5961
    60 creddy --attribute \
     62$eloc/creddy --attribute \
    6163       --issuer WarnerBros_ID.pem --key WarnerBros_private.pem --role character \
    6264       --subject-cert Coyote_ID.pem \
  • tests/creddy_prover_tests/acme_rockets_intersection_rt0/run_query

    rec550f7 r3c30b59  
    11#!/bin/sh
    2 # acme_rockets_intersection
    32
    4 pwd=`pwd`
     3. ${TESTDIR}/test_util.sh
     4keyloc=`pwd`
    55
    6 eloc=`which abac_prover | sed 's/\/abac_prover//'`
    7 if [ "$eloc" = "" ]; then
    8   echo "ERROR: abac_prover is not in the search path!!!"
    9   exit 1
    10 fi
    11 keyloc=$pwd
    12 
    13 acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
    14 batman=`creddy --keyid --cert $keyloc/Batman_ID.pem`
    15 coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
     6acme=`$eloc/creddy --keyid --cert $keyloc/Acme_ID.pem`
     7batman=`$eloc/creddy --keyid --cert $keyloc/Batman_ID.pem`
     8coyote=`$eloc/creddy --keyid --cert $keyloc/Coyote_ID.pem`
    169
    1710buy_rockets="$acme.buy_rockets"
     
    2114bad_buy_rockets2="99$acme.buy_rockets"
    2215
    23 echo "  "
    2416echo "===good============ Acme.buy_rockets <- Coyote"
    25 $eloc/abac_prover  --keystore $keyloc \
    26               --role "$buy_rockets" --principal "$coyote_prin"
     17runTest creddy_prover_test/acme_rockets_intersection_rt0 test1 \
     18  "$ploc/abac_prover --keystore $keyloc --role $buy_rockets --principal $coyote_prin" \
     19  0 \
     20  "simple rt0 query"
    2721
    28 echo "  "
    2922echo "===bad============ Acme.bad_buy_rockets <- Coyote"
    30 $eloc/abac_prover  --keystore $keyloc \
    31               --role "$bad_buy_rockets" --principal "$coyote_prin"
     23runTest creddy_prover_test/acme_rockets_intersection_rt0 test2 \
     24  "$ploc/abac_prover  --keystore $keyloc --role $bad_buy_rockets --principal $coyote_prin" \
     25  1 \
     26  "expected failure, query fail with unfound role but should return with partial proof"
    3227
    33 echo "  "
    3428echo "===bad============ 99Acme.buy_rockets <- Coyote"
    35 $eloc/abac_prover  --keystore $keyloc \
    36               --role "$bad_buy_rockets2" --principal "$coyote_prin"
     29runTest creddy_prover_test/acme_rockets_intersection_rt0 test3 \
     30  "$ploc/abac_prover  --keystore $keyloc --role $bad_buy_rockets2 --principal $coyote_prin" \
     31  1 \
     32  "expected failure, query fail with none existing issuer principal"
    3733
    38 echo "  "
    3934echo "===bad=============== Acme.buy_rockets <- Batman"
    40 $eloc/abac_prover  --keystore $keyloc \
    41               --role "$buy_rockets" --principal "$batman_prin"
     35runTest creddy_prover_test/acme_rockets_intersection_rt0 test4 \
     36  "$ploc/abac_prover  --keystore $keyloc --role $buy_rockets --principal $batman_prin" \
     37  1 \
     38  "expected failure, query fail with none existing target principal"
    4239
    43 
  • tests/creddy_prover_tests/acme_rockets_rt0/README

    rec550f7 r3c30b59  
    2020
    2121rm -rf *.pem *.xml
    22 
    23 pwd=`pwd`
    24 eloc=`which creddy | sed 's/\/creddy//'`
    25 if [ "$eloc" = "" ]; then
    26   echo "ERROR: creddy is not in the search path!!!"
    27   exit 1
    28 fi
     22. ${TESTDIR}/test_util.sh
    2923
    3024$eloc/creddy --generate --cn Acme
  • tests/creddy_prover_tests/acme_rockets_rt0/run_query

    rec550f7 r3c30b59  
    11#!/bin/sh
    22
    3 pwd=`pwd`
    4 eloc=`which abac_prover | sed 's/\/abac_prover//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: abac_prover is not in the search path!!!"
    7   exit 1
    8 fi
     3. ${TESTDIR}/test_util.sh
     4keyloc=`pwd`
    95
    10 keyloc=$pwd
    11 
    12 acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
    13 coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
     6acme=`$eloc/creddy --keyid --cert $keyloc/Acme_ID.pem`
     7coyote=`$eloc/creddy --keyid --cert $keyloc/Coyote_ID.pem`
    148
    159preferred_customer="$acme.preferred_customer"
     
    2115#[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote]
    2216#isMember(pCoyote, role(pAcme,preferred_customer), C).
    23 echo "  "
    2417echo "===good============ Acme.preferred_customer <- Coyote"
    25 $eloc/abac_prover  --keystore $keyloc \
    26       --role "$preferred_customer" --principal "$coyote_prin"
     18runTest creddy_prover_test/acme_rockets_rt0 test1 \
     19  "$ploc/abac_prover  --keystore $keyloc --role $preferred_customer --principal $coyote_prin" \
     20  0 \
     21  "simple rt0 query with 1 matched rule"
    2722
    2823#[keyid:Acme].role:buy_rockets <-?- [keyid:Coyote]
    2924#isMember(pCoyote, role(pAcme,buy_rockets), C).
    30 echo "  "
    3125echo "===good=============== Acme.buy_rockets <- Coyote"
    32 $eloc/abac_prover  --keystore $keyloc \
    33         --role "$buy_rockets" --principal "$coyote_prin"
     26runTest creddy_prover_test/acme_rockets_rt0 test2 \
     27  "$ploc/abac_prover  --keystore $keyloc --role $buy_rockets --principal $coyote_prin" \
     28  0 \
     29  "rt0 query that returns 2 rules"
    3430
    3531## this is not suppose to work
    3632#[keyid:Acme].role:buy_rockets <-?- [keyid:Acme].role:preferred_customer
    37 echo "  "
    3833echo "===bad=============== Acme.buy_rockets <- Acme.preferred_customer"
    39 $eloc/abac_prover  --keystore $keyloc \
    40         --role "$buy_rockets" --principal "$preferred_customer"
     34runTest creddy_prover_test/acme_rockets_rt0 test3 \
     35  "$ploc/abac_prover  --keystore $keyloc --role $buy_rockets --principal $preferred_customer" \
     36  0 \
     37  "this query is not suppose to work but alas did not block it, a.r1 <- b.r2"
    4138
    4239#[keyid:Coyote].role:friend <-?- [keyid:Acme]
    4340#isMember(pAcme, role(pCoyote,friend), C).
    44 echo "  "
    4541echo "===bad=============== Coyote.friend <- Acme"
    46 $eloc/abac_prover  --keystore $keyloc \
    47         --role "$friend" --principal "$acme_prin"
    48 
     42runTest creddy_prover_test/acme_rockets_rt0 test4 \
     43  "$ploc/abac_prover  --keystore $keyloc --role $friend --principal $acme_prin" \
     44  1 \
     45  "the assumption is not supported by rules "
  • tests/creddy_prover_tests/experiment_create_rt0/README

    rec550f7 r3c30b59  
    2828rm -rf *.pem *.xml
    2929
    30 creddy --generate --cn Acme
     30. ${TESTDIR}/test_util.sh
    3131
    32 creddy --generate --cn Globotron
     32$eloc/creddy --generate --cn Acme
    3333
    34 creddy --generate --cn Alice
     34$eloc/creddy --generate --cn Globotron
    3535
    36 creddy --generate --cn Bob
     36$eloc/creddy --generate --cn Alice
    3737
    38 creddy --attribute \
     38$eloc/creddy --generate --cn Bob
     39
     40$eloc/creddy --attribute \
    3941       --issuer Acme_ID.pem --key Acme_private.pem --role experiment_create \
    4042       --subject-cert Acme_ID.pem --subject-role partner.experiment_create \
    4143       --out Acme_experiment_create__Acme_partner_experiment_create_attr.xml
    4244
    43 creddy --attribute \
     45$eloc/creddy --attribute \
    4446       --issuer Acme_ID.pem --key Acme_private.pem --role partner \
    4547       --subject-cert Globotron_ID.pem \
    4648       --out Acme_partner__Globotron_attr.xml
    4749
    48 creddy --attribute \
     50$eloc/creddy --attribute \
    4951       --issuer Globotron_ID.pem --key Globotron_private.pem --role experiment_create \
    5052       --subject-cert Globotron_ID.pem --subject-role admin.power_user \
    5153       --out Globotron_experiment_create__Globotron_admin_power_user_attr.xml
    5254
    53 creddy --attribute \
     55$eloc/creddy --attribute \
    5456       --issuer Globotron_ID.pem --key Globotron_private.pem --role admin \
    5557       --subject-cert Alice_ID.pem \
    5658       --out Globotron_admin__Alice_attr.xml
    5759
    58 creddy --attribute \
     60$eloc/creddy --attribute \
    5961       --issuer Alice_ID.pem --key Alice_private.pem --role power_user \
    6062       --subject-cert Bob_ID.pem \
  • tests/creddy_prover_tests/experiment_create_rt0/run_query

    rec550f7 r3c30b59  
    11#!/bin/sh
    22
    3 pwd=`pwd`
    4 eloc=`which abac_prover | sed 's/\/abac_prover//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: abac_prover is not in the search path!!!"
    7   exit 1
    8 fi
    9 keyloc=$pwd
     3. ${TESTDIR}/test_util.sh
     4keyloc=`pwd`
    105
    11 acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
    12 alice=`creddy --keyid --cert $keyloc/Alice_ID.pem`
    13 bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
    14 globotron=`creddy --keyid --cert $keyloc/Globotron_ID.pem`
     6acme=`$eloc/creddy --keyid --cert $keyloc/Acme_ID.pem`
     7alice=`$eloc/creddy --keyid --cert $keyloc/Alice_ID.pem`
     8bob=`$eloc/creddy --keyid --cert $keyloc/Bob_ID.pem`
     9globotron=`$eloc/creddy --keyid --cert $keyloc/Globotron_ID.pem`
    1510
    1611glob_admin="$globotron.admin"
     
    1914experiment_create="$acme.experiment_create"
    2015
    21 echo " "
    2216echo "===good=============== Globotron.admin <- Alice"
    23 $eloc/abac_prover  --keystore $keyloc \
    24              --role "$glob_admin" --principal "$alice_prin"
    25 
    26 echo " "
    27 echo "===bad=============== Globotron.admin <- Bob"
    28 $eloc/abac_prover  --keystore $keyloc \
    29              --role "$glob_admin" --principal "$bob_prin"
    30 
    31 echo " "
    32 echo "===good=============== Acme.experiment_create <- Bob"
    33 $eloc/abac_prover  --keystore $keyloc \
    34              --role "$experiment_create" --principal "$bob_prin"
     17runTest creddy_prover_test/experiment_create_rt0 test1 \
     18  "$ploc/abac_prover  --keystore $keyloc --role $glob_admin --principal $alice_prin" \
     19  0 \
     20  "simple query"
    3521
    3622
     23echo "===bad=============== Globotron.admin <- Bob"
     24runTest creddy_prover_test/experiment_create_rt0 test2 \
     25  "$ploc/abac_prover  --keystore $keyloc --role $glob_admin --principal $bob_prin" \
     26  1 \
     27  "no rule support this, should get a partial proof"
     28
     29echo "===good=============== Acme.experiment_create <- Bob"
     30runTest creddy_prover_test/experiment_create_rt0 test3 \
     31  "$ploc/abac_prover  --keystore $keyloc  --role $experiment_create --principal $bob_prin" \
     32  0 \
     33  "mutilple rules intersection proof"
     34
     35
     36
     37
  • tests/creddy_prover_tests/ice_cream_rt0/README

    rd6d44fe r3c30b59  
    1515rm -rf *.pem *.xml
    1616
    17 pwd=`pwd`
    18 eloc=`which creddy | sed 's/\/creddy//'`
    19 if [ "$eloc" = "" ]; then
    20   echo "ERROR: creddy is not in the search path!!!"
    21   exit 1
    22 fi
     17. ${TESTDIR}/test_util.sh
    2318
    2419$eloc/creddy --generate --cn IceCream
  • tests/creddy_prover_tests/ice_cream_rt0/run_query

    rd6d44fe r3c30b59  
    11#!/bin/sh
    22
    3 pwd=`pwd`
    4 eloc=`which abac_prover | sed 's/\/abac_prover//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: abac_prover is not in the search path!!!"
    7   exit 1
    8 fi
     3. ${TESTDIR}/test_util.sh
     4keyloc=`pwd`
    95
    10 keyloc=$pwd
    11 
    12 ice=`creddy --keyid --cert $keyloc/IceCream_ID.pem`
    13 chocolate_prin=`creddy --keyid --cert $keyloc/Chocolate_ID.pem`
     6ice=`$eloc/creddy --keyid --cert $keyloc/IceCream_ID.pem`
     7chocolate_prin=`$eloc/creddy --keyid --cert $keyloc/Chocolate_ID.pem`
    148
    159delicious="$ice.delicious"
    1610
    17 echo "  "
    1811echo "===good============ IceCream.delicious <- Chocolate"
    19 $eloc/abac_prover  --keystore $keyloc \
    20       --role "$delicious" --principal "$chocolate_prin"
     12runTest creddy_prover_test/ice_cream_rt0 test1 \
     13  "$ploc/abac_prover  --keystore $keyloc --role $delicious --principal $chocolate_prin" \
     14  0 \
     15  "very basic simple call"
     16
     17rm -rf IceCream*.pem
     18echo "===good(no issuer)============ IceCream.delicious <- Chocolate"
     19runTest creddy_prover_test/ice_cream_rt0 test2 \
     20  "$ploc/abac_prover  --keystore $keyloc --role $delicious --principal $chocolate_prin" \
     21  0 \
     22  "basic simple call without the issuer's principal id in local keystore"
    2123
    2224
    23 rm -rf IceCream*.pem
    24 echo "  "
    25 echo "===good(no issuer)============ IceCream.delicious <- Chocolate"
    26 $eloc/abac_prover  --keystore $keyloc \
    27       --role "$delicious" --principal "$chocolate_prin"
     25rm -rf Chocolate*.pem
     26echo "===good(no issuer & no principal)============ IceCream.delicious <- Chocolate"
     27runTest creddy_prover_test/ice_cream_rt0 test1 \
     28  "$ploc/abac_prover  --keystore $keyloc --role $delicious --principal $chocolate_prin" \
     29  0 \
     30  "basic simple call without the issuer's principal id nor principal id in local keystore"
    2831
    29 rm -rf Chocolate*.pem
    30 echo "  "
    31 echo "===good(no issuer & no principal)============ IceCream.delicious <- Chocolate"
    32 $eloc/abac_prover  --keystore $keyloc \
    33       --role "$delicious" --principal "$chocolate_prin"
    34 
    35 
  • tests/creddy_tests/Makefile

    rec550f7 r3c30b59  
    1 
    2 .PHONY : runcheck clean
    3 runcheck: $(DIRECTORY)
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
     2# tests/creddy_tests/Makefile.  Generated from Makefile.in by configure.
     3
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
     7# This Makefile.in is free software; the Free Software Foundation
     8# gives unlimited permission to copy and/or distribute it,
     9# with or without modifications, as long as this notice is preserved.
     10
     11# This program is distributed in the hope that it will be useful,
     12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     14# PARTICULAR PURPOSE.
     15
     16
     17
     18#
     19# creddy_tests
     20#
     21
     22pkgdatadir = $(datadir)/abac
     23pkgincludedir = $(includedir)/abac
     24pkglibdir = $(libdir)/abac
     25pkglibexecdir = $(libexecdir)/abac
     26am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
     27install_sh_DATA = $(install_sh) -c -m 644
     28install_sh_PROGRAM = $(install_sh) -c
     29install_sh_SCRIPT = $(install_sh) -c
     30INSTALL_HEADER = $(INSTALL_DATA)
     31transform = $(program_transform_name)
     32NORMAL_INSTALL = :
     33PRE_INSTALL = :
     34POST_INSTALL = :
     35NORMAL_UNINSTALL = :
     36PRE_UNINSTALL = :
     37POST_UNINSTALL = :
     38build_triplet = i686-pc-linux-gnu
     39host_triplet = i686-pc-linux-gnu
     40subdir = tests/creddy_tests
     41DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     42ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     43am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
     44        $(top_srcdir)/m4/ax_check_xml2.m4 \
     45        $(top_srcdir)/m4/ax_check_xmlsec1.m4 \
     46        $(top_srcdir)/m4/ax_pkg_swig.m4 \
     47        $(top_srcdir)/m4/ax_python_devel.m4 \
     48        $(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
     49        $(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
     50        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
     51        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
     52        $(top_srcdir)/configure.ac
     53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     54        $(ACLOCAL_M4)
     55mkinstalldirs = $(install_sh) -d
     56CONFIG_CLEAN_FILES =
     57CONFIG_CLEAN_VPATH_FILES =
     58SOURCES =
     59DIST_SOURCES =
     60DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     61ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
     62AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
     63AR = ar
     64AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
     65AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
     66AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
     67AWK = gawk
     68AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     69AX_SWIG_PYTHON_OPT = -python
     70CC = gcc
     71CCDEPMODE = depmode=gcc3
     72CFLAGS = -g -O2
     73CPP = gcc -E
     74CPPFLAGS =
     75CXX = g++
     76CXXCPP = g++ -E
     77CXXDEPMODE = depmode=gcc3
     78CXXFLAGS = -g -O2
     79CYGPATH_W = echo
     80DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
     81DEPDIR = .deps
     82DSYMUTIL =
     83DUMPBIN =
     84ECHO_C =
     85ECHO_N = -n
     86ECHO_T =
     87EGREP = /bin/grep -E
     88EXEEXT =
     89FGREP = /bin/grep -F
     90GREP = /bin/grep
     91INSTALL = /usr/bin/install -c
     92INSTALL_DATA = ${INSTALL} -m 644
     93INSTALL_PROGRAM = ${INSTALL}
     94INSTALL_SCRIPT = ${INSTALL}
     95INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     96LD = /usr/bin/ld
     97LDFLAGS =
     98LIBOBJS =
     99LIBS =
     100LIBTOOL = $(SHELL) $(top_builddir)/libtool
     101LIPO =
     102LN_S = ln -s
     103LTLIBOBJS =
     104MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
     105MKDIR_P = /bin/mkdir -p
     106NM = /usr/bin/nm -B
     107NMEDIT =
     108OBJDUMP = objdump
     109OBJEXT = o
     110OPENSSL_INCLUDES = 
     111OPENSSL_LDFLAGS = 
     112OPENSSL_LIBS = -lssl -lcrypto 
     113OTOOL =
     114OTOOL64 =
     115PACKAGE = abac
     116PACKAGE_BUGREPORT = faber@ISI.EDU
     117PACKAGE_NAME = ABAC
     118PACKAGE_STRING = ABAC 0.1.5
     119PACKAGE_TARNAME = abac
     120PACKAGE_URL =
     121PACKAGE_VERSION = 0.1.5
     122PATH_SEPARATOR = :
     123PERL = perl
     124PKG_CONFIG = /usr/bin/pkg-config
     125PYTHON = /usr/local/bin/python
     126PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     127PYTHON_EXEC_PREFIX = ${exec_prefix}
     128PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
     129PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
     130PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
     131PYTHON_PLATFORM = linux2
     132PYTHON_PREFIX = ${prefix}
     133PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
     134PYTHON_VERSION = 2.7
     135RANLIB = ranlib
     136SED = /bin/sed
     137SET_MAKE =
     138SHELL = /bin/bash
     139SITE_PERL = /usr/local/lib/site_perl
     140STRIP = strip
     141SWIG = /usr/local/bin/swig -c++
     142SWIG_LIB = /usr/local/share/swig/2.0.4
     143VERSION = 0.1.5
     144XML2_CONFIG = /usr/bin/xml2-config
     145XML2_INCLUDES = -I/usr/include/libxml2
     146XML2_LDFLAGS = -lxml2
     147XML2_LIBS = -lxml2
     148XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
     149XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
     150XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     151XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     152abs_builddir = /home/mei/Deter/abac0-master/tests/creddy_tests
     153abs_srcdir = /home/mei/Deter/abac0-master/tests/creddy_tests
     154abs_top_builddir = /home/mei/Deter/abac0-master
     155abs_top_srcdir = /home/mei/Deter/abac0-master
     156ac_ct_CC = gcc
     157ac_ct_CXX = g++
     158ac_ct_DUMPBIN =
     159am__include = include
     160am__leading_dot = .
     161am__quote =
     162am__tar = ${AMTAR} chof - "$$tardir"
     163am__untar = ${AMTAR} xf -
     164bindir = ${exec_prefix}/bin
     165build = i686-pc-linux-gnu
     166build_alias =
     167build_cpu = i686
     168build_os = linux-gnu
     169build_vendor = pc
     170builddir = .
     171datadir = ${datarootdir}
     172datarootdir = ${prefix}/share
     173docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
     174dvidir = ${docdir}
     175exec_prefix = ${prefix}
     176host = i686-pc-linux-gnu
     177host_alias =
     178host_cpu = i686
     179host_os = linux-gnu
     180host_vendor = pc
     181htmldir = ${docdir}
     182includedir = ${prefix}/include
     183infodir = ${datarootdir}/info
     184install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
     185libdir = ${exec_prefix}/lib
     186libexecdir = ${exec_prefix}/libexec
     187localedir = ${datarootdir}/locale
     188localstatedir = ${prefix}/var
     189lt_ECHO = echo
     190mandir = ${datarootdir}/man
     191mkdir_p = /bin/mkdir -p
     192oldincludedir = /usr/include
     193pdfdir = ${docdir}
     194pkgpyexecdir = ${pyexecdir}/abac
     195pkgpythondir = ${pythondir}/abac
     196prefix = /usr/local
     197program_transform_name = s,x,x,
     198psdir = ${docdir}
     199pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
     200pythondir = ${prefix}/lib/python2.7/site-packages
     201sbindir = ${exec_prefix}/sbin
     202sharedstatedir = ${prefix}/com
     203srcdir = .
     204sysconfdir = ${prefix}/etc
     205target_alias =
     206top_build_prefix = ../../
     207top_builddir = ../..
     208top_srcdir = ../..
     209INCLUDES = -I$(abs_top_srcdir)/libabac
     210LDADD = $(abs_top_builddir)/libabac/libabac.la
     211CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
     212PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
     213TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
     214MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
     215SCRIPT = verify roles attribute keyid generate display attribute_rule
     216all: all-am
     217
     218.SUFFIXES:
     219$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     220        @for dep in $?; do \
     221          case '$(am__configure_deps)' in \
     222            *$$dep*) \
     223              ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
     224                && { if test -f $@; then exit 0; else break; fi; }; \
     225              exit 1;; \
     226          esac; \
     227        done; \
     228        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/creddy_tests/Makefile'; \
     229        $(am__cd) $(top_srcdir) && \
     230          $(AUTOMAKE) --foreign tests/creddy_tests/Makefile
     231.PRECIOUS: Makefile
     232Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     233        @case '$?' in \
     234          *config.status*) \
     235            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     236          *) \
     237            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     238            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     239        esac;
     240
     241$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     242        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     243
     244$(top_srcdir)/configure:  $(am__configure_deps)
     245        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     246$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     247        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     248$(am__aclocal_m4_deps):
     249
     250mostlyclean-libtool:
     251        -rm -f *.lo
     252
     253clean-libtool:
     254        -rm -rf .libs _libs
     255tags: TAGS
     256TAGS:
     257
     258ctags: CTAGS
     259CTAGS:
     260
     261
     262distdir: $(DISTFILES)
     263        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     264        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     265        list='$(DISTFILES)'; \
     266          dist_files=`for file in $$list; do echo $$file; done | \
     267          sed -e "s|^$$srcdirstrip/||;t" \
     268              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
     269        case $$dist_files in \
     270          */*) $(MKDIR_P) `echo "$$dist_files" | \
     271                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
     272                           sort -u` ;; \
     273        esac; \
     274        for file in $$dist_files; do \
     275          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
     276          if test -d $$d/$$file; then \
     277            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
     278            if test -d "$(distdir)/$$file"; then \
     279              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     280            fi; \
     281            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
     282              cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
     283              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     284            fi; \
     285            cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     286          else \
     287            test -f "$(distdir)/$$file" \
     288            || cp -p $$d/$$file "$(distdir)/$$file" \
     289            || exit 1; \
     290          fi; \
     291        done
     292check-am: all-am
     293check: check-am
     294all-am: Makefile
     295installdirs:
     296install: install-am
     297install-exec: install-exec-am
     298install-data: install-data-am
     299uninstall: uninstall-am
     300
     301install-am: all-am
     302        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     303
     304installcheck: installcheck-am
     305install-strip:
     306        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     307          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     308          `test -z '$(STRIP)' || \
     309            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     310mostlyclean-generic:
     311
     312clean-generic:
     313
     314distclean-generic:
     315        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     316        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     317
     318maintainer-clean-generic:
     319        @echo "This command is intended for maintainers to use"
     320        @echo "it deletes files that may require special tools to rebuild."
     321clean-am: clean-generic clean-libtool clean-local mostlyclean-am
     322
     323distclean: distclean-am
     324        -rm -f Makefile
     325distclean-am: clean-am distclean-generic
     326
     327dvi: dvi-am
     328
     329dvi-am:
     330
     331html: html-am
     332
     333html-am:
     334
     335info: info-am
     336
     337info-am:
     338
     339install-data-am:
     340
     341install-dvi: install-dvi-am
     342
     343install-dvi-am:
     344
     345install-exec-am:
     346
     347install-html: install-html-am
     348
     349install-html-am:
     350
     351install-info: install-info-am
     352
     353install-info-am:
     354
     355install-man:
     356
     357install-pdf: install-pdf-am
     358
     359install-pdf-am:
     360
     361install-ps: install-ps-am
     362
     363install-ps-am:
     364
     365installcheck-am:
     366
     367maintainer-clean: maintainer-clean-am
     368        -rm -f Makefile
     369maintainer-clean-am: distclean-am maintainer-clean-generic
     370
     371mostlyclean: mostlyclean-am
     372
     373mostlyclean-am: mostlyclean-generic mostlyclean-libtool
     374
     375pdf: pdf-am
     376
     377pdf-am:
     378
     379ps: ps-am
     380
     381ps-am:
     382
     383uninstall-am:
     384
     385.MAKE: install-am install-strip
     386
     387.PHONY: all all-am check check-am clean clean-generic clean-libtool \
     388        clean-local distclean distclean-generic distclean-libtool \
     389        distdir dvi dvi-am html html-am info info-am install \
     390        install-am install-data install-data-am install-dvi \
     391        install-dvi-am install-exec install-exec-am install-html \
     392        install-html-am install-info install-info-am install-man \
     393        install-pdf install-pdf-am install-ps install-ps-am \
     394        install-strip installcheck installcheck-am installdirs \
     395        maintainer-clean maintainer-clean-generic mostlyclean \
     396        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
     397        uninstall uninstall-am
     398
     399
     400.PHONY: runcheck clean-local setup
     401
     402runcheck: setup.sh
     403        @echo 'running libabac CREDDY testing...' | tee result
     404        @make clean
     405        @$(MY_ENV) ./setup.sh
     406        @touch error
     407        @for i in $(SCRIPT); do \
     408          echo "---running $$i script"  >> result; \
     409          $(MY_ENV) ./$$i.sh | tee -a result |grep BAD >> error; cd .; \
     410        done
     411        @if test -f error ; \
     412          then \
     413            (if test `cat error | wc -l ` -eq 0 ; \
     414              then echo "   PASSED"; \
     415              else (echo "   ERROR!!!"; cat error;) \
     416            fi) \
     417          else echo "   PASSED"; \
     418        fi
    4419
    5420clean:
    6         rm -rf *.xml *.pem *.out
    7         rm -rf result
    8 
    9 runcheck:
    10         @echo 'running libabac CREDDY testing...'
    11         @./run_test > result 2>/dev/null; \
    12         if test -f result && test `diff -q result.save result |wc -l ` -eq 0 ; \
    13         then echo "   PASSED"; \
    14         else echo "   ERROR:got changes!!!"; \
    15         fi
     421        @rm -rf *.xml *.pem error result
     422
     423clean-local:
     424        @rm -rf *.xml *.pem error result
     425
     426# Tell versions [3.59,3.63) of GNU make to not export all variables.
     427# Otherwise a system limit (for SysV at least) may be exceeded.
     428.NOEXPORT:
  • tests/creddy_tests/attribute.sh

    rec550f7 r3c30b59  
    11#!/bin/sh
     2#attribute.sh
    23
    3 pwd=`pwd`
    4 eloc=`which creddy | sed 's/\/creddy//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: creddy is not in the search path!!!"
    7   exit 1
    8 fi
     4. ${TESTDIR}/test_util.sh
    95
    10 $eloc/creddy --attribute \
     6runTest "creddy_tests/attribute.sh" "test1"  \
     7"$eloc/creddy --attribute \
    118       --issuer Acme_ID.pem --key Acme_private.pem --role roleOne \
    129       --subject-cert Acme_ID.pem --subject-role simple_subject_role \
    13        --out Acme_roleOne__Acme_simple_subject_role_attr.xml
     10       --out Acme_roleOne__Acme_simple_subject_role_attr.xml" \
     110  "simple role attribute creation with same issuer"
    1412
    15 $eloc/creddy --attribute \
     13runTest "creddy_tests/attribute.sh" "test2"  \
     14"$eloc/creddy --attribute \
    1615       --issuer Acme_ID.pem --role roleTwo \
    1716       --subject-cert Acme_ID.pem --subject-role simple_subject_role \
    18        --out Acme_roleTwo__Acme_simple_subject_role_attr.xml
     17       --out Acme_roleTwo__Acme_simple_subject_role_attr.xml" \
     181  "simple role attribute creation without privkey key"
    1919
    20 $eloc/creddy --attribute \
     20runTest "creddy_tests/attribute.sh" "test3"  \
     21"$eloc/creddy --attribute \
    2122       --issuer Acme_ID.pem --key Acme_private.pem --role roleThree \
    2223       --subject-cert Coyote_ID.pem --subject-role simple_subject_role \
    23        --out Acme_roleThree__Coyote_simple_subject_role_attr.xml
     24       --out Acme_roleThree__Coyote_simple_subject_role_attr.xml" \
     250  "simple role attribute creation with differ issuer certs"
    2426
    25 $eloc/creddy --attribute \
     27runTest "creddy_tests/attribute.sh" "test4"  \
     28"$eloc/creddy --attribute \
    2629       --issuer Acme_ID.pem --key Coyote_private.pem --role roleFour \
    2730       --subject-cert Coyote_ID.pem --subject-role simple_subject_role \
    28        --out Acme_roleFour__Coyote_simple_subject_role_attr.xml
     31       --out Acme_roleFour__Coyote_simple_subject_role_attr.xml" \
     321  "simple role attribute creation with wrong privkey key"
    2933
    30 
  • tests/creddy_tests/attribute_rule.sh

    rec550f7 r3c30b59  
    11#!/bin/sh
    2 
    32#attribute_rule.sh
    43
    5 pwd=`pwd`
    6 eloc=`which creddy | sed 's/\/creddy//'`
    7 if [ "$eloc" = "" ]; then
    8   echo "ERROR: creddy is not in the search path!!!"
    9   exit 1
    10 fi
     4. ${TESTDIR}/test_util.sh
    115
    12 $eloc/creddy --generate --cn Bigbird 1>/dev/null 2>& 1
    13 $eloc/creddy --generate --cn Coyote 1>/dev/null 2>& 1
    14 
    15 bigbird=`creddy --keyid --cert Bigbird_ID.pem`
    16 coyote=`creddy --keyid --cert Coyote_ID.pem`
     6bigbird=`$eloc/creddy --keyid --cert Bigbird_ID.pem`
     7coyote=`$eloc/creddy --keyid --cert Coyote_ID.pem`
    178
    189rule="$coyote.sneaky_friend<-$bigbird"
    1910
    20 $eloc/creddy --attribute \
     11runTest "creddy_tests/attribute_rule.sh" "test1"  \
     12"$eloc/creddy --attribute \
    2113       --issuer Coyote_ID.pem --key Coyote_private.pem \
    2214       --attrrule "$rule" \
    23        --out Coyote_sneakyFriend__Bigbird_attr.xml
     15       --out Coyote_sneakyFriend__Bigbird_attr.xml"  \
     160  "trying making attribute using attrrule option"
    2417
    25 $eloc/creddy --roles --cert Coyote_sneakyFriend__Bigbird_attr.xml
     18runTest "creddy_tests/attribute_rule.sh" "test2"  \
     19"$eloc/creddy --roles --cert Coyote_sneakyFriend__Bigbird_attr.xml"  \
     200  "double check on the attribute made with atttrrule option"
    2621
  • tests/creddy_tests/display.sh

    rec550f7 r3c30b59  
    11#!/bin/sh
     2#display.sh
    23
    3 pwd=`pwd`
    4 eloc=`which creddy | sed 's/\/creddy//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: creddy is not in the search path!!!"
    7   exit 1
    8 fi
     4. ${TESTDIR}/test_util.sh
    95
    10 $eloc/creddy --display --show=all --cert Acme_ID.pem
    11 $eloc/creddy --display --show=all --cert Acme_private.pem
    12 $eloc/creddy --display --show=all --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml
    13 $eloc/creddy --display --show=all --cert Acme_preferred_customer__Coyote_attr.xml
    14 $eloc/creddy --display --show=all --cert bad_attr.xml
     6runTest "creddy_tests/display.sh" "test1"  \
     7"$eloc/creddy --display --show=all --cert Acme_ID.pem" \
     80  "display an issuer cert"
    159
    16 $eloc/creddy --display --show=all --cert not_ss.pem
    17 $eloc/creddy --display --show=all --cert not_ss.xml
     10runTest "creddy_tests/display.sh" "test2"  \
     11"$eloc/creddy --display --show=all --cert Acme_private.pem" \
     121  "display a privkey file"
    1813
    19 $eloc/creddy --display --show=all --cert ProtoGENI.xml
    20 $eloc/creddy --display --show=all --cert PGissuer.pem
    21 $eloc/creddy --display --show=all --cert priv.xml
     14runTest "creddy_tests/display.sh" "test3"  \
     15"$eloc/creddy --display --show=all --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
     160  "display an attribute cert"
     17
     18runTest "creddy_tests/display.sh" "test4"  \
     19"$eloc/creddy --display --show=all --cert Acme_preferred_customer__Coyote_attr.xml" \
     200  "display an attribute cert"
     21
     22runTest "creddy_tests/display.sh" "test5"  \
     23"$eloc/creddy --display --show=all --cert bad_attr.xml" \
     241  "supplied a none existing attribute cert"
     25
     26runTest "creddy_tests/display.sh" "test6"  \
     27"$eloc/creddy --display --show=all --cert not_ss.pem" \
     280  "display an none self signed issuer cert"
     29
     30runTest "creddy_tests/display.sh" "test7"  \
     31"$eloc/creddy --display --show=all --cert not_ss.xml" \
     320  "display a none self signed attribute cert"
     33
     34runTest "creddy_tests/display.sh" "test8"  \
     35"$eloc/creddy --display --show=all --cert iProtoGENI.xml" \
     361  "display an expired GENI signed attribute cert"
     37
     38runTest "creddy_tests/display.sh" "test9"  \
     39"$eloc/creddy --display --show=all --cert ProtoGENI.xml" \
     400  "FAKE:display a valid GENI signed attribute cert"
     41
     42runTest "creddy_tests/display.sh" "test10"  \
     43"$eloc/creddy --display --show=all --cert PGissuer.pem" \
     440  "display a GENI issuer cert"
     45
     46runTest "creddy_tests/display.sh" "test11"  \
     47"$eloc/creddy --display --show=all --cert priv.xml" \
     480  "display a GENI privilege attribute cert"
     49
     50
  • tests/creddy_tests/generate.sh

    rec550f7 r3c30b59  
    11#!/bin/sh
     2#generate.sh
    23
    3 pwd=`pwd`
    4 eloc=`which creddy | sed 's/\/creddy//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: creddy is not in the search path!!!"
    7   exit 1
    8 fi
     4. ${TESTDIR}/test_util.sh
    95
    10 $eloc/creddy --generate --cn Bigbird
    11 $eloc/creddy --generate --cn 12_3
    12 ## looks like optarg just picked up the 'Bad' part
    13 $eloc/creddy --generate --cn Bad$name
    14 $eloc/creddy --generate --cn abc --cert bad_attr.xml
     6runTest "creddy_tests/generate.sh" "test1", \
     7"$eloc/creddy --generate --cn Bigbird"  \
     80  "simple id credential generation"
     9
     10runTest "creddy_tests/generate.sh" "test2", \
     11"$eloc/creddy --generate --cn 12_3"  \
     120  "generate with underline in name"
     13
     14runTest "creddy_tests/generate.sh" "test3", \
     15"$eloc/creddy --generate --cn Bad$name"  \
     160  "generate with special $ as Bad$name, later part just got dropped"
     17
     18runTest "creddy_tests/generate.sh" "test4", \
     19"$eloc/creddy --generate --cn abc --cert gen_attr.xml"  \
     200  "generate with supplied attribute name"
     21
  • tests/creddy_tests/keyid.sh

    rec550f7 r3c30b59  
    11#!/bin/sh
     2# keyid.sh
    23
    3 pwd=`pwd`
    4 eloc=`which creddy | sed 's/\/creddy//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: creddy is not in the search path!!!"
    7   exit 1
    8 fi
     4. ${TESTDIR}/test_util.sh
    95
    10 $eloc/creddy --keyid --cert Acme_ID.pem
    11 $eloc/creddy --keyid --cert Acme_private.pem
    12 $eloc/creddy --keyid --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml
    13 $eloc/creddy --keyid --cert bad_attr.xml
     6runTest "creddy_tests/keyid.sh" "test1"  \
     7"$eloc/creddy --keyid --cert Acme_ID.pem" \
     80  "supplied with good identity cert"
    149
    15 $eloc/creddy --keyid --cert not_ss.pem
    16 $eloc/creddy --keyid --cert not_ss.xml
    17 $eloc/creddy --keyid --cert priv.xml
    18 $eloc/creddy --keyid --cert PGissuer.pem
    19 $eloc/creddy --keyid --cert ProtoGENI.xml
     10runTest "creddy_tests/keyid.sh" "test2"  \
     11"$eloc/creddy --keyid --cert Acme_private.pem" \
     121  "supplied with privkey"
    2013
     14runTest "creddy_tests/keyid.sh" "test3"  \
     15"$eloc/creddy --keyid --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
     161  "supplied with attribute cert instead"
     17
     18runTest "creddy_tests/keyid.sh" "test4"  \
     19"$eloc/creddy --keyid --cert bad_attr.xml" \
     201  "supplied with non existing attribute cert"
     21
     22runTest "creddy_tests/keyid.sh" "test5"  \
     23"$eloc/creddy --keyid --cert not_ss.pem" \
     240  "supplied with good none self signed identity cert"
     25
     26runTest "creddy_tests/keyid.sh" "test6"  \
     27"$eloc/creddy --keyid --cert not_ss.xml" \
     281  "supplied with none self signed attribute cert"
     29
     30runTest "creddy_tests/keyid.sh" "test7"  \
     31"$eloc/creddy --keyid --cert priv.xml" \
     321  "supplied with GENI privilege attribute cert"
     33
     34runTest "creddy_tests/keyid.sh" "test8"  \
     35"$eloc/creddy --keyid --cert PGissuer.pem" \
     360  "supplied with GENI issuer cert"
     37
     38runTest "creddy_tests/keyid.sh" "test9"  \
     39"$eloc/creddy --keyid --cert ProtoGENI.xml" \
     401  "supplied with GENI issued attribute cert"
     41
  • tests/creddy_tests/roles.sh

    rec550f7 r3c30b59  
    11#!/bin/sh
     2#roles.sh
    23
    3 pwd=`pwd`
    4 eloc=`which creddy | sed 's/\/creddy//'`
    5 if [ "$eloc" = "" ]; then
    6   echo "ERROR: creddy is not in the search path!!!"
    7   exit 1
    8 fi
     4. ${TESTDIR}/test_util.sh
    95
    10 $eloc/creddy --roles --cert Acme_ID.pem
    11 $eloc/creddy --roles --cert Acme_private.pem
    12 $eloc/creddy --roles --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml
    13 $eloc/creddy --roles --cert bad_attr.xml
     6runTest "creddy_tests/role.sh" "test1"  \
     7"$eloc/creddy --roles --cert Acme_ID.pem" \
     8 1  "supplied  with a issuer cert"
     9
     10runTest "creddy_tests/role.sh" "test2"  \
     11"$eloc/creddy --roles --cert Acme_private.pem" \
     12 1  "supplied with a privkey"
     13
     14runTest "creddy_tests/role.sh" "test3"  \
     15"$eloc/creddy --roles --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
     16 0  "supplied with right attribute cert"
     17
     18runTest "creddy_tests/role.sh" "test4"  \
     19"$eloc/creddy --roles --cert bad_attr.xml" \
     20 1  "supplied with a none existing cert"
     21
     22runTest "creddy_tests/role.sh" "test5"  \
     23"$eloc/creddy --roles --cert priv.xml" \
     24 0  "supplied with a GENI priviledge cert"
     25
     26runTest "creddy_tests/role.sh" "test6"  \
     27"$eloc/creddy --roles --cert not_ss.xml" \
     28 0  "supplied with a none self signed attribute cert"
     29
     30runTest "creddy_tests/role.sh" "test7"  \
     31"$eloc/creddy --roles --cert iProtoGENI.xml" \
     32 1  "supplied with an expired  GENI signed attribute cert"
     33
     34
     35
  • tests/creddy_tests/setup.sh

    rec550f7 r3c30b59  
    44#Acme.preferred_customer <- Coyote
    55
    6 rm -rf *.pem *.xml *.out
     6. ${TESTDIR}/test_util.sh
    77
    8 pwd=`pwd`
    9 eloc=`which creddy | sed 's/\/creddy//'`
    10 if [ "$eloc" = "" ]; then
    11   echo "ERROR: creddy is not in the search path!!!"
    12   exit 1
    13 fi
     8$eloc/creddy --generate --cn Acme 1>/dev/null 2>&1
     9$eloc/creddy --generate --cn Coyote 1>/dev/null 2>&1
    1410
    15 $eloc/creddy --generate --cn Acme
    16 $eloc/creddy --generate --cn Coyote
     11$eloc/creddy --generate --cn Bigbird 1>/dev/null 2>& 1
     12$eloc/creddy --generate --cn Coyote 1>/dev/null 2>& 1
    1713
    1814$eloc/creddy --attribute \
     
    3026cp priv.xml_save priv.xml
    3127cp PGissuer.pem_save PGissuer.pem
    32 cp ProtoGENI.xml_save ProtoGENI.xml
     28cp iProtoGENI.xml_save iProtoGENI.xml
     29## waiting for a real valid one..
     30cp iProtoGENI.xml_save ProtoGENI.xml
    3331
  • tests/creddy_tests/verify.sh

    rec550f7 r3c30b59  
    11#!/bin/sh
    2 #creddy --verify --cert <cert> [ --attrcert <cert> ]
     2#creddy --verify --cert <issuer> [ --attrcert <cert> ]
     3#verify.sh
    34
    4 pwd=`pwd`
    5 eloc=`which creddy | sed 's/\/creddy//'`
    6 if [ "$eloc" = "" ]; then
    7   echo "ERROR: creddy is not in the search path!!!"
    8   exit 1
    9 fi
     5. ${TESTDIR}/test_util.sh
    106
    11 $eloc/creddy --verify --cert Coyote_ID.pem --attrcert Acme_buy_rockets__Acme_preferred_customer_attr.xml
    12 $eloc/creddy --verify --cert Acme_ID.pem --attrcert Acme_buy_rockets__Acme_preferred_customer_attr.xml
     7runXTest "creddy_tests/verify.sh" "test1" \
     8"$eloc/creddy --verify --cert Coyote_ID.pem --attrcert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
     90  "have mismatched principals" "ID and attr are still valid but differ in principals"
    1310
    14 $eloc/creddy --verify --cert Acme_private.pem
    15 $eloc/creddy --verify --cert Acme_ID.pem --attrcert bad_attr.xml
    16 $eloc/creddy --verify --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml
    17 $eloc/creddy --verify --cert bad_attr.xml
    18 $eloc/creddy --verify --cert Coyote_ID.pem
     11runTest "creddy_tests/verify.sh" "test2" \
     12"$eloc/creddy --verify --cert Acme_ID.pem --attrcert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
     130  "matching principal and attribute"
    1914
    20 $eloc/creddy --verify --cert not_ss.pem
    21 $eloc/creddy --verify --cert not_ss.xml
    22 $eloc/creddy --verify --cert priv.xml
    23 $eloc/creddy --verify --cert PGissuer.pem
    24 $eloc/creddy --verify --cert ProtoGENI.xml
     15runTest "creddy_tests/verify.sh" "test3" \
     16"$eloc/creddy --verify --cert Acme_private.pem" \
     171 "verify with just a privkey"
     18
     19## this should really fail with a specific error code,
     20runTest "creddy_tests/verify.sh" "test4" \
     21"$eloc/creddy --verify --cert Acme_ID.pem --attrcert bad_attr.xml" \
     220  "verify with non existing attribute, but still pass because issuer is okay"
     23
     24runTest "creddy_tests/verify.sh" "test5"  \
     25"$eloc/creddy --verify --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml " \
     261  "verify with just an attribute"
     27
     28runTest "creddy_tests/verify.sh" "test6"  \
     29"$eloc/creddy --verify --cert bad_attr.xml" \
     301  "verify with just a none existing attribute"
     31
     32runTest "creddy_tests/verify.sh" "test7"  \
     33"$eloc/creddy --verify --cert Coyote_ID.pem" \
     340  "verify just an issuer"
     35
     36runTest "creddy_tests/verify.sh" "test8"  \
     37"$eloc/creddy --verify --cert not_ss.pem" \
     380  "verify just a none self signed principal pem"
     39
     40runTest "creddy_tests/verify.sh" "test9" \
     41"$eloc/creddy --verify --attrcert not_ss.xml" \
     421  "verify just a none self signed attribute"
     43
     44runTest "creddy_tests/verify.sh" "test10" \
     45"$eloc/creddy --verify --cert not_ss.xml" \
     461  "incorrectly trying to verify a none self signed attribute as an issuer cert"
     47
     48runTest "creddy_tests/verify.sh" "test11"  \
     49"$eloc/creddy --verify --cert priv.xml" \
     501  "trying to verify GENI privilege attribute as an issuer cert"
     51
     52runTest "creddy_tests/verify.sh" "test12"  \
     53"$eloc/creddy --verify --cert PGissuer.pem" \
     540  "verify a GENI's issuer pem"
     55
     56runTest "creddy_tests/verify.sh" "test13"  \
     57"$eloc/creddy --verify --cert ProtoGENI.xml" \
     581  "incorrectly trying to verify a GENI issued attribute as issuer cert"
     59
     60
  • tests/example_scripts/Makefile

    rec550f7 r3c30b59  
    1 
    2 DIRECTORY=c perl python wiki
    3 
    4 .PHONY : runcheck clean
    5 runcheck: $(DIRECTORY)
    6 
    7 clean:
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
     2# tests/example_scripts/Makefile.  Generated from Makefile.in by configure.
     3
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
     7# This Makefile.in is free software; the Free Software Foundation
     8# gives unlimited permission to copy and/or distribute it,
     9# with or without modifications, as long as this notice is preserved.
     10
     11# This program is distributed in the hope that it will be useful,
     12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     14# PARTICULAR PURPOSE.
     15
     16
     17
     18pkgdatadir = $(datadir)/abac
     19pkgincludedir = $(includedir)/abac
     20pkglibdir = $(libdir)/abac
     21pkglibexecdir = $(libexecdir)/abac
     22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
     23install_sh_DATA = $(install_sh) -c -m 644
     24install_sh_PROGRAM = $(install_sh) -c
     25install_sh_SCRIPT = $(install_sh) -c
     26INSTALL_HEADER = $(INSTALL_DATA)
     27transform = $(program_transform_name)
     28NORMAL_INSTALL = :
     29PRE_INSTALL = :
     30POST_INSTALL = :
     31NORMAL_UNINSTALL = :
     32PRE_UNINSTALL = :
     33POST_UNINSTALL = :
     34build_triplet = i686-pc-linux-gnu
     35host_triplet = i686-pc-linux-gnu
     36subdir = tests/example_scripts
     37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     39am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
     40        $(top_srcdir)/m4/ax_check_xml2.m4 \
     41        $(top_srcdir)/m4/ax_check_xmlsec1.m4 \
     42        $(top_srcdir)/m4/ax_pkg_swig.m4 \
     43        $(top_srcdir)/m4/ax_python_devel.m4 \
     44        $(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
     45        $(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
     46        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
     47        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
     48        $(top_srcdir)/configure.ac
     49am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     50        $(ACLOCAL_M4)
     51mkinstalldirs = $(install_sh) -d
     52CONFIG_CLEAN_FILES =
     53CONFIG_CLEAN_VPATH_FILES =
     54SOURCES =
     55DIST_SOURCES =
     56DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     57ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
     58AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
     59AR = ar
     60AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
     61AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
     62AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
     63AWK = gawk
     64AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     65AX_SWIG_PYTHON_OPT = -python
     66CC = gcc
     67CCDEPMODE = depmode=gcc3
     68CFLAGS = -g -O2
     69CPP = gcc -E
     70CPPFLAGS =
     71CXX = g++
     72CXXCPP = g++ -E
     73CXXDEPMODE = depmode=gcc3
     74CXXFLAGS = -g -O2
     75CYGPATH_W = echo
     76DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
     77DEPDIR = .deps
     78DSYMUTIL =
     79DUMPBIN =
     80ECHO_C =
     81ECHO_N = -n
     82ECHO_T =
     83EGREP = /bin/grep -E
     84EXEEXT =
     85FGREP = /bin/grep -F
     86GREP = /bin/grep
     87INSTALL = /usr/bin/install -c
     88INSTALL_DATA = ${INSTALL} -m 644
     89INSTALL_PROGRAM = ${INSTALL}
     90INSTALL_SCRIPT = ${INSTALL}
     91INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     92LD = /usr/bin/ld
     93LDFLAGS =
     94LIBOBJS =
     95LIBS =
     96LIBTOOL = $(SHELL) $(top_builddir)/libtool
     97LIPO =
     98LN_S = ln -s
     99LTLIBOBJS =
     100MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
     101MKDIR_P = /bin/mkdir -p
     102NM = /usr/bin/nm -B
     103NMEDIT =
     104OBJDUMP = objdump
     105OBJEXT = o
     106OPENSSL_INCLUDES = 
     107OPENSSL_LDFLAGS = 
     108OPENSSL_LIBS = -lssl -lcrypto 
     109OTOOL =
     110OTOOL64 =
     111PACKAGE = abac
     112PACKAGE_BUGREPORT = faber@ISI.EDU
     113PACKAGE_NAME = ABAC
     114PACKAGE_STRING = ABAC 0.1.5
     115PACKAGE_TARNAME = abac
     116PACKAGE_URL =
     117PACKAGE_VERSION = 0.1.5
     118PATH_SEPARATOR = :
     119PERL = perl
     120PKG_CONFIG = /usr/bin/pkg-config
     121PYTHON = /usr/local/bin/python
     122PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     123PYTHON_EXEC_PREFIX = ${exec_prefix}
     124PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
     125PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
     126PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
     127PYTHON_PLATFORM = linux2
     128PYTHON_PREFIX = ${prefix}
     129PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
     130PYTHON_VERSION = 2.7
     131RANLIB = ranlib
     132SED = /bin/sed
     133SET_MAKE =
     134SHELL = /bin/bash
     135SITE_PERL = /usr/local/lib/site_perl
     136STRIP = strip
     137SWIG = /usr/local/bin/swig -c++
     138SWIG_LIB = /usr/local/share/swig/2.0.4
     139VERSION = 0.1.5
     140XML2_CONFIG = /usr/bin/xml2-config
     141XML2_INCLUDES = -I/usr/include/libxml2
     142XML2_LDFLAGS = -lxml2
     143XML2_LIBS = -lxml2
     144XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
     145XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
     146XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     147XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     148abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts
     149abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts
     150abs_top_builddir = /home/mei/Deter/abac0-master
     151abs_top_srcdir = /home/mei/Deter/abac0-master
     152ac_ct_CC = gcc
     153ac_ct_CXX = g++
     154ac_ct_DUMPBIN =
     155am__include = include
     156am__leading_dot = .
     157am__quote =
     158am__tar = ${AMTAR} chof - "$$tardir"
     159am__untar = ${AMTAR} xf -
     160bindir = ${exec_prefix}/bin
     161build = i686-pc-linux-gnu
     162build_alias =
     163build_cpu = i686
     164build_os = linux-gnu
     165build_vendor = pc
     166builddir = .
     167datadir = ${datarootdir}
     168datarootdir = ${prefix}/share
     169docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
     170dvidir = ${docdir}
     171exec_prefix = ${prefix}
     172host = i686-pc-linux-gnu
     173host_alias =
     174host_cpu = i686
     175host_os = linux-gnu
     176host_vendor = pc
     177htmldir = ${docdir}
     178includedir = ${prefix}/include
     179infodir = ${datarootdir}/info
     180install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
     181libdir = ${exec_prefix}/lib
     182libexecdir = ${exec_prefix}/libexec
     183localedir = ${datarootdir}/locale
     184localstatedir = ${prefix}/var
     185lt_ECHO = echo
     186mandir = ${datarootdir}/man
     187mkdir_p = /bin/mkdir -p
     188oldincludedir = /usr/include
     189pdfdir = ${docdir}
     190pkgpyexecdir = ${pyexecdir}/abac
     191pkgpythondir = ${pythondir}/abac
     192prefix = /usr/local
     193program_transform_name = s,x,x,
     194psdir = ${docdir}
     195pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
     196pythondir = ${prefix}/lib/python2.7/site-packages
     197sbindir = ${exec_prefix}/sbin
     198sharedstatedir = ${prefix}/com
     199srcdir = .
     200sysconfdir = ${prefix}/etc
     201target_alias =
     202top_build_prefix = ../../
     203top_builddir = ../..
     204top_srcdir = ../..
     205
     206#
     207# example_scripts
     208#
     209INCLUDES = -I$(abs_top_srcdir)/libabac
     210LDADD = $(abs_top_builddir)/libabac/libabac.la
     211DIRECTORY = c perl python wiki
     212all: all-am
     213
     214.SUFFIXES:
     215$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     216        @for dep in $?; do \
     217          case '$(am__configure_deps)' in \
     218            *$$dep*) \
     219              ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
     220                && { if test -f $@; then exit 0; else break; fi; }; \
     221              exit 1;; \
     222          esac; \
     223        done; \
     224        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/Makefile'; \
     225        $(am__cd) $(top_srcdir) && \
     226          $(AUTOMAKE) --foreign tests/example_scripts/Makefile
     227.PRECIOUS: Makefile
     228Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     229        @case '$?' in \
     230          *config.status*) \
     231            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     232          *) \
     233            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     234            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     235        esac;
     236
     237$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     238        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     239
     240$(top_srcdir)/configure:  $(am__configure_deps)
     241        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     242$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     243        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     244$(am__aclocal_m4_deps):
     245
     246mostlyclean-libtool:
     247        -rm -f *.lo
     248
     249clean-libtool:
     250        -rm -rf .libs _libs
     251tags: TAGS
     252TAGS:
     253
     254ctags: CTAGS
     255CTAGS:
     256
     257
     258distdir: $(DISTFILES)
     259        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     260        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     261        list='$(DISTFILES)'; \
     262          dist_files=`for file in $$list; do echo $$file; done | \
     263          sed -e "s|^$$srcdirstrip/||;t" \
     264              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
     265        case $$dist_files in \
     266          */*) $(MKDIR_P) `echo "$$dist_files" | \
     267                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
     268                           sort -u` ;; \
     269        esac; \
     270        for file in $$dist_files; do \
     271          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
     272          if test -d $$d/$$file; then \
     273            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
     274            if test -d "$(distdir)/$$file"; then \
     275              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     276            fi; \
     277            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
     278              cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
     279              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     280            fi; \
     281            cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     282          else \
     283            test -f "$(distdir)/$$file" \
     284            || cp -p $$d/$$file "$(distdir)/$$file" \
     285            || exit 1; \
     286          fi; \
     287        done
     288check-am: all-am
     289check: check-am
     290all-am: Makefile
     291installdirs:
     292install: install-am
     293install-exec: install-exec-am
     294install-data: install-data-am
     295uninstall: uninstall-am
     296
     297install-am: all-am
     298        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     299
     300installcheck: installcheck-am
     301install-strip:
     302        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     303          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     304          `test -z '$(STRIP)' || \
     305            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     306mostlyclean-generic:
     307
     308clean-generic:
     309
     310distclean-generic:
     311        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     312        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     313
     314maintainer-clean-generic:
     315        @echo "This command is intended for maintainers to use"
     316        @echo "it deletes files that may require special tools to rebuild."
     317clean: clean-am
     318
     319clean-am: clean-generic clean-libtool clean-local mostlyclean-am
     320
     321distclean: distclean-am
     322        -rm -f Makefile
     323distclean-am: clean-am distclean-generic
     324
     325dvi: dvi-am
     326
     327dvi-am:
     328
     329html: html-am
     330
     331html-am:
     332
     333info: info-am
     334
     335info-am:
     336
     337install-data-am:
     338
     339install-dvi: install-dvi-am
     340
     341install-dvi-am:
     342
     343install-exec-am:
     344
     345install-html: install-html-am
     346
     347install-html-am:
     348
     349install-info: install-info-am
     350
     351install-info-am:
     352
     353install-man:
     354
     355install-pdf: install-pdf-am
     356
     357install-pdf-am:
     358
     359install-ps: install-ps-am
     360
     361install-ps-am:
     362
     363installcheck-am:
     364
     365maintainer-clean: maintainer-clean-am
     366        -rm -f Makefile
     367maintainer-clean-am: distclean-am maintainer-clean-generic
     368
     369mostlyclean: mostlyclean-am
     370
     371mostlyclean-am: mostlyclean-generic mostlyclean-libtool
     372
     373pdf: pdf-am
     374
     375pdf-am:
     376
     377ps: ps-am
     378
     379ps-am:
     380
     381uninstall-am:
     382
     383.MAKE: install-am install-strip
     384
     385.PHONY: all all-am check check-am clean clean-generic clean-libtool \
     386        clean-local distclean distclean-generic distclean-libtool \
     387        distdir dvi dvi-am html html-am info info-am install \
     388        install-am install-data install-data-am install-dvi \
     389        install-dvi-am install-exec install-exec-am install-html \
     390        install-html-am install-info install-info-am install-man \
     391        install-pdf install-pdf-am install-ps install-ps-am \
     392        install-strip installcheck installcheck-am installdirs \
     393        maintainer-clean maintainer-clean-generic mostlyclean \
     394        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
     395        uninstall uninstall-am
     396
     397
     398.PHONY : runcheck clean-local
     399
     400all: runcheck
     401
     402clean-local:
    8403        @for i in $(DIRECTORY); do \
    9         here=`pwd`; \
    10         cd $$i; \
    11         make -s clean; \
    12         cd $$here; \
    13         done 
    14         @rm -rf allout.tmp
     404          here=`pwd`; \
     405          cd $$i; \
     406          make -s clean; \
     407          cd $$here; \
     408        done
     409        @rm -rf result error
    15410
    16411runcheck:
    17         @echo 'running libabac SCRIPT testing...'
     412        @echo 'running libabac SCRIPT testing...' | tee result
     413        @touch error;
    18414        @for i in $(DIRECTORY); do \
    19         here=`pwd`; \
    20         cd $$i; \
    21         printf "\n ==> RUN on %s\n" "$$i" >> ../allout.tmp ; \
    22         ./run_test 1 >> ../allout.tmp 2>& 1; \
    23         cd $$here; \
    24         done
    25         @if test -f allout.tmp && test `diff -q allout.save allout.tmp |wc -l ` -eq 0 ; \
    26         then echo "   PASSED"; \
    27         else echo "   ERROR:got changes!!!"; \
     415          here=`pwd`; \
     416          cd $$i; \
     417          printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \
     418          make -s |tee -a $$here/result |grep BAD >> $$here/error; \
     419          cd $$here; \
     420        done
     421        @if test -f error ; \
     422          then \
     423            (if test `cat error | wc -l ` -eq 0 ; \
     424              then echo "   PASSED"; \
     425              else (echo "   ERROR!!!"; cat error;); \
     426            fi); \
     427          else echo "   PASSED"; \
    28428        fi
     429
     430# Tell versions [3.59,3.63) of GNU make to not export all variables.
     431# Otherwise a system limit (for SysV at least) may be exceeded.
     432.NOEXPORT:
  • tests/example_scripts/c/Makefile

    rec550f7 r3c30b59  
    1 
    2 LDFLAGS =-L/usr/local/lib -labac -lm -lpthread -Wl,-rpath
    3 
    4 all: attr prove tt
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
     2# tests/example_scripts/c/Makefile.  Generated from Makefile.in by configure.
     3
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
     7# This Makefile.in is free software; the Free Software Foundation
     8# gives unlimited permission to copy and/or distribute it,
     9# with or without modifications, as long as this notice is preserved.
     10
     11# This program is distributed in the hope that it will be useful,
     12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     14# PARTICULAR PURPOSE.
     15
     16
     17
     18#
     19# example_scripts/c
     20#
     21
     22pkgdatadir = $(datadir)/abac
     23pkgincludedir = $(includedir)/abac
     24pkglibdir = $(libdir)/abac
     25pkglibexecdir = $(libexecdir)/abac
     26am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
     27install_sh_DATA = $(install_sh) -c -m 644
     28install_sh_PROGRAM = $(install_sh) -c
     29install_sh_SCRIPT = $(install_sh) -c
     30INSTALL_HEADER = $(INSTALL_DATA)
     31transform = $(program_transform_name)
     32NORMAL_INSTALL = :
     33PRE_INSTALL = :
     34POST_INSTALL = :
     35NORMAL_UNINSTALL = :
     36PRE_UNINSTALL = :
     37POST_UNINSTALL = :
     38build_triplet = i686-pc-linux-gnu
     39host_triplet = i686-pc-linux-gnu
     40subdir = tests/example_scripts/c
     41DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     42ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     43am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
     44        $(top_srcdir)/m4/ax_check_xml2.m4 \
     45        $(top_srcdir)/m4/ax_check_xmlsec1.m4 \
     46        $(top_srcdir)/m4/ax_pkg_swig.m4 \
     47        $(top_srcdir)/m4/ax_python_devel.m4 \
     48        $(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
     49        $(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
     50        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
     51        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
     52        $(top_srcdir)/configure.ac
     53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     54        $(ACLOCAL_M4)
     55mkinstalldirs = $(install_sh) -d
     56CONFIG_CLEAN_FILES =
     57CONFIG_CLEAN_VPATH_FILES =
     58SOURCES =
     59DIST_SOURCES =
     60DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     61ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
     62AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
     63AR = ar
     64AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
     65AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
     66AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
     67AWK = gawk
     68AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     69AX_SWIG_PYTHON_OPT = -python
     70CC = gcc
     71CCDEPMODE = depmode=gcc3
     72CFLAGS = -g -O2
     73CPP = gcc -E
     74CPPFLAGS =
     75CXX = g++
     76CXXCPP = g++ -E
     77CXXDEPMODE = depmode=gcc3
     78CXXFLAGS = -g -O2
     79CYGPATH_W = echo
     80DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
     81DEPDIR = .deps
     82DSYMUTIL =
     83DUMPBIN =
     84ECHO_C =
     85ECHO_N = -n
     86ECHO_T =
     87EGREP = /bin/grep -E
     88EXEEXT =
     89FGREP = /bin/grep -F
     90GREP = /bin/grep
     91INSTALL = /usr/bin/install -c
     92INSTALL_DATA = ${INSTALL} -m 644
     93INSTALL_PROGRAM = ${INSTALL}
     94INSTALL_SCRIPT = ${INSTALL}
     95INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     96LD = /usr/bin/ld
     97LDFLAGS = -L$(abs_top_builddir)/libabac/.libs -labac -lm -lpthread -Wl,-rpath
     98LIBOBJS =
     99LIBS =
     100LIBTOOL = $(SHELL) $(top_builddir)/libtool
     101LIPO =
     102LN_S = ln -s
     103LTLIBOBJS =
     104MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
     105MKDIR_P = /bin/mkdir -p
     106NM = /usr/bin/nm -B
     107NMEDIT =
     108OBJDUMP = objdump
     109OBJEXT = o
     110OPENSSL_INCLUDES = 
     111OPENSSL_LDFLAGS = 
     112OPENSSL_LIBS = -lssl -lcrypto 
     113OTOOL =
     114OTOOL64 =
     115PACKAGE = abac
     116PACKAGE_BUGREPORT = faber@ISI.EDU
     117PACKAGE_NAME = ABAC
     118PACKAGE_STRING = ABAC 0.1.5
     119PACKAGE_TARNAME = abac
     120PACKAGE_URL =
     121PACKAGE_VERSION = 0.1.5
     122PATH_SEPARATOR = :
     123PERL = perl
     124PKG_CONFIG = /usr/bin/pkg-config
     125PYTHON = /usr/local/bin/python
     126PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     127PYTHON_EXEC_PREFIX = ${exec_prefix}
     128PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
     129PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
     130PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
     131PYTHON_PLATFORM = linux2
     132PYTHON_PREFIX = ${prefix}
     133PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
     134PYTHON_VERSION = 2.7
     135RANLIB = ranlib
     136SED = /bin/sed
     137SET_MAKE =
     138SHELL = /bin/bash
     139SITE_PERL = /usr/local/lib/site_perl
     140STRIP = strip
     141SWIG = /usr/local/bin/swig -c++
     142SWIG_LIB = /usr/local/share/swig/2.0.4
     143VERSION = 0.1.5
     144XML2_CONFIG = /usr/bin/xml2-config
     145XML2_INCLUDES = -I/usr/include/libxml2
     146XML2_LDFLAGS = -lxml2
     147XML2_LIBS = -lxml2
     148XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
     149XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
     150XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     151XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     152abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts/c
     153abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts/c
     154abs_top_builddir = /home/mei/Deter/abac0-master
     155abs_top_srcdir = /home/mei/Deter/abac0-master
     156ac_ct_CC = gcc
     157ac_ct_CXX = g++
     158ac_ct_DUMPBIN =
     159am__include = include
     160am__leading_dot = .
     161am__quote =
     162am__tar = ${AMTAR} chof - "$$tardir"
     163am__untar = ${AMTAR} xf -
     164bindir = ${exec_prefix}/bin
     165build = i686-pc-linux-gnu
     166build_alias =
     167build_cpu = i686
     168build_os = linux-gnu
     169build_vendor = pc
     170builddir = .
     171datadir = ${datarootdir}
     172datarootdir = ${prefix}/share
     173docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
     174dvidir = ${docdir}
     175exec_prefix = ${prefix}
     176host = i686-pc-linux-gnu
     177host_alias =
     178host_cpu = i686
     179host_os = linux-gnu
     180host_vendor = pc
     181htmldir = ${docdir}
     182includedir = ${prefix}/include
     183infodir = ${datarootdir}/info
     184install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
     185libdir = ${exec_prefix}/lib
     186libexecdir = ${exec_prefix}/libexec
     187localedir = ${datarootdir}/locale
     188localstatedir = ${prefix}/var
     189lt_ECHO = echo
     190mandir = ${datarootdir}/man
     191mkdir_p = /bin/mkdir -p
     192oldincludedir = /usr/include
     193pdfdir = ${docdir}
     194pkgpyexecdir = ${pyexecdir}/abac
     195pkgpythondir = ${pythondir}/abac
     196prefix = /usr/local
     197program_transform_name = s,x,x,
     198psdir = ${docdir}
     199pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
     200pythondir = ${prefix}/lib/python2.7/site-packages
     201sbindir = ${exec_prefix}/sbin
     202sharedstatedir = ${prefix}/com
     203srcdir = .
     204sysconfdir = ${prefix}/etc
     205target_alias =
     206top_build_prefix = ../../../
     207top_builddir = ../../..
     208top_srcdir = ../../..
     209INCLUDES = -I$(abs_top_srcdir)/libabac
     210LDADD = $(abs_top_builddir)/libabac/libabac.la
     211CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
     212PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
     213TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
     214MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) LD_LIBRARY_PATH=$(abs_top_builddir)/libabac/.libs
     215all: all-am
     216
     217.SUFFIXES:
     218$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     219        @for dep in $?; do \
     220          case '$(am__configure_deps)' in \
     221            *$$dep*) \
     222              ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
     223                && { if test -f $@; then exit 0; else break; fi; }; \
     224              exit 1;; \
     225          esac; \
     226        done; \
     227        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/c/Makefile'; \
     228        $(am__cd) $(top_srcdir) && \
     229          $(AUTOMAKE) --foreign tests/example_scripts/c/Makefile
     230.PRECIOUS: Makefile
     231Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     232        @case '$?' in \
     233          *config.status*) \
     234            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     235          *) \
     236            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     237            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     238        esac;
     239
     240$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     241        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     242
     243$(top_srcdir)/configure:  $(am__configure_deps)
     244        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     245$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     246        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     247$(am__aclocal_m4_deps):
     248
     249mostlyclean-libtool:
     250        -rm -f *.lo
     251
     252clean-libtool:
     253        -rm -rf .libs _libs
     254tags: TAGS
     255TAGS:
     256
     257ctags: CTAGS
     258CTAGS:
     259
     260
     261distdir: $(DISTFILES)
     262        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     263        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     264        list='$(DISTFILES)'; \
     265          dist_files=`for file in $$list; do echo $$file; done | \
     266          sed -e "s|^$$srcdirstrip/||;t" \
     267              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
     268        case $$dist_files in \
     269          */*) $(MKDIR_P) `echo "$$dist_files" | \
     270                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
     271                           sort -u` ;; \
     272        esac; \
     273        for file in $$dist_files; do \
     274          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
     275          if test -d $$d/$$file; then \
     276            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
     277            if test -d "$(distdir)/$$file"; then \
     278              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     279            fi; \
     280            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
     281              cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
     282              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     283            fi; \
     284            cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     285          else \
     286            test -f "$(distdir)/$$file" \
     287            || cp -p $$d/$$file "$(distdir)/$$file" \
     288            || exit 1; \
     289          fi; \
     290        done
     291check-am: all-am
     292check: check-am
     293all-am: Makefile
     294installdirs:
     295install: install-am
     296install-exec: install-exec-am
     297install-data: install-data-am
     298uninstall: uninstall-am
     299
     300install-am: all-am
     301        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     302
     303installcheck: installcheck-am
     304install-strip:
     305        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     306          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     307          `test -z '$(STRIP)' || \
     308            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     309mostlyclean-generic:
     310
     311clean-generic:
     312
     313distclean-generic:
     314        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     315        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     316
     317maintainer-clean-generic:
     318        @echo "This command is intended for maintainers to use"
     319        @echo "it deletes files that may require special tools to rebuild."
     320clean: clean-am
     321
     322clean-am: clean-generic clean-libtool clean-local mostlyclean-am
     323
     324distclean: distclean-am
     325        -rm -f Makefile
     326distclean-am: clean-am distclean-generic
     327
     328dvi: dvi-am
     329
     330dvi-am:
     331
     332html: html-am
     333
     334html-am:
     335
     336info: info-am
     337
     338info-am:
     339
     340install-data-am:
     341
     342install-dvi: install-dvi-am
     343
     344install-dvi-am:
     345
     346install-exec-am:
     347
     348install-html: install-html-am
     349
     350install-html-am:
     351
     352install-info: install-info-am
     353
     354install-info-am:
     355
     356install-man:
     357
     358install-pdf: install-pdf-am
     359
     360install-pdf-am:
     361
     362install-ps: install-ps-am
     363
     364install-ps-am:
     365
     366installcheck-am:
     367
     368maintainer-clean: maintainer-clean-am
     369        -rm -f Makefile
     370maintainer-clean-am: distclean-am maintainer-clean-generic
     371
     372mostlyclean: mostlyclean-am
     373
     374mostlyclean-am: mostlyclean-generic mostlyclean-libtool
     375
     376pdf: pdf-am
     377
     378pdf-am:
     379
     380ps: ps-am
     381
     382ps-am:
     383
     384uninstall-am:
     385
     386.MAKE: install-am install-strip
     387
     388.PHONY: all all-am check check-am clean clean-generic clean-libtool \
     389        clean-local distclean distclean-generic distclean-libtool \
     390        distdir dvi dvi-am html html-am info info-am install \
     391        install-am install-data install-data-am install-dvi \
     392        install-dvi-am install-exec install-exec-am install-html \
     393        install-html-am install-info install-info-am install-man \
     394        install-pdf install-pdf-am install-ps install-ps-am \
     395        install-strip installcheck installcheck-am installdirs \
     396        maintainer-clean maintainer-clean-generic mostlyclean \
     397        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
     398        uninstall uninstall-am
     399
     400
     401.PHONY: clean-local
     402
     403all: attr prove
    5404
    6405abac_attr.o: abac_attr.c
    7         gcc -g -I/usr/local/include -c abac_attr.c -o abac_attr.o
     406        @gcc -g $(INCLUDES) -c abac_attr.c -o abac_attr.o
    8407
    9408abac_attr: abac_attr.o
    10         gcc -g -o abac_attr abac_attr.o $(LDFLAGS)
     409        @gcc -g -o abac_attr abac_attr.o $(LDFLAGS)
    11410
    12411abac_prover.o: abac_prover.c
    13         gcc -g -I/usr/local/include -c abac_prover.c -o abac_prover.o
     412        @gcc -g $(INCLUDES) -c abac_prover.c -o abac_prover.o
    14413
    15414abac_prover: abac_prover.o
    16         gcc -g -o abac_prover abac_prover.o $(LDFLAGS)
     415        @gcc -g -o abac_prover abac_prover.o $(LDFLAGS)
    17416
    18417tchunk: tchunk.c
    19         gcc -g -I/usr/local/include -c tchunk.c -o tchunk.o
     418        gcc -g $(INCLUDES) -c tchunk.c -o tchunk.o
    20419        gcc -g -o tchunk tchunk.o $(LDFLAGS)
    21420        ./tchunk 0 IceCream_ID.pem IceCream_private.pem
     
    23422
    24423tt: tbasic.c
    25         gcc -g -I/usr/local/include -c tbasic.c -o tbasic.o
     424        gcc -g $(INCLUDES) -c tbasic.c -o tbasic.o
    26425        gcc -g -o tt tbasic.o $(LDFLAGS)
    27426        ./tt
    28427
    29 clean:
     428clean-local:
    30429        @rm -rf abac_attr.o abac_attr *.pem *.xml abac_prover.o
    31430        @rm -rf abac_prover *.log
     
    34433setup2: abac_attr abac_prover abac_attr_partial
    35434
    36 setup: abac_attr
    37         creddy --generate --cn IceCream
    38         creddy --generate --cn Chocolate
    39 
    40435attr:
    41         rm -rf attr.log
    42         make setup
    43         ./abac_attr IceCream_ID.pem  IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>attr.log 2>&1
     436        @echo '---running (c) attr script'
     437        @$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
     438        @make abac_attr
     439        @(rc=`$(MY_ENV) ./abac_attr IceCream_ID.pem  IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 2>/dev/null 2>/dev/null | grep "attr success"` ; \
     440        if [ -z "$$rc" ]; then \
     441          echo "BAD:example_scripts/c/abac_attr:using libabac c to make attributes"; \
     442        else \
     443          echo "GOOD:example_scripts/c/abac_attr:using libabac c to make attributes"; \
     444        fi)
    44445
    45446prove: abac_prover
    46         rm -rf prover.log
    47         make attr
    48         ./run_prover 1>prover.log 2>&1
     447        @echo '---running (c) prover script'
     448        @$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
     449        @make abac_attr
     450        @$(MY_ENV) ./abac_attr IceCream_ID.pem  IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>/dev/null 2>&1
     451        (rc=`$(MY_ENV) ./run_prover | grep "prover success" ` ; \
     452        if [ -z "$$rc" ]; then \
     453          echo "BAD:example_scripts/c/abac_prover:using libabac c to make a prover"; \
     454        else \
     455          echo "GOOD:example_scripts/c/abac_prover:using libabac c to make a prover"; \
     456        fi)
    49457
    50458mattr: attr.c
     
    52460mload: loader.c
    53461        gcc -g -o mload loader.c $(LDFLAGS)
     462
     463# Tell versions [3.59,3.63) of GNU make to not export all variables.
     464# Otherwise a system limit (for SysV at least) may be exceeded.
     465.NOEXPORT:
  • tests/example_scripts/c/run_prover

    rbec30b5 r3c30b59  
    11#!/bin/sh
    22
     3. ${TESTDIR}/test_util.sh
     4
    35keystore=`pwd`
    4 pID=`creddy --keyid --cert ${keystore}/IceCream_ID.pem`
    5 cID=`creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
     6pID=`$eloc/creddy --keyid --cert ${keystore}/IceCream_ID.pem`
     7cID=`$eloc/creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
    68
    79role="${pID}.delicious"
    810principal="${cID}"
    911
    10 if [ $1 = "debug" ]; then
    11     echo "$keystore" "$role" "$principal"
    12     gdb ./abac_prover
    13 else
    14     ./abac_prover "$keystore" "$role" "$principal"
    15 fi
     12#    echo "$keystore" "$role" "$principal"
     13#    gdb ./abac_prover
    1614
     15./abac_prover "$keystore" "$role" "$principal"
     16
  • tests/example_scripts/perl/Makefile

    rec550f7 r3c30b59  
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
     2# tests/example_scripts/perl/Makefile.  Generated from Makefile.in by configure.
     3
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
     7# This Makefile.in is free software; the Free Software Foundation
     8# gives unlimited permission to copy and/or distribute it,
     9# with or without modifications, as long as this notice is preserved.
     10
     11# This program is distributed in the hope that it will be useful,
     12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     14# PARTICULAR PURPOSE.
     15
     16
     17
     18#
     19# example_scripts/perl
     20#
     21
     22pkgdatadir = $(datadir)/abac
     23pkgincludedir = $(includedir)/abac
     24pkglibdir = $(libdir)/abac
     25pkglibexecdir = $(libexecdir)/abac
     26am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
     27install_sh_DATA = $(install_sh) -c -m 644
     28install_sh_PROGRAM = $(install_sh) -c
     29install_sh_SCRIPT = $(install_sh) -c
     30INSTALL_HEADER = $(INSTALL_DATA)
     31transform = $(program_transform_name)
     32NORMAL_INSTALL = :
     33PRE_INSTALL = :
     34POST_INSTALL = :
     35NORMAL_UNINSTALL = :
     36PRE_UNINSTALL = :
     37POST_UNINSTALL = :
     38build_triplet = i686-pc-linux-gnu
     39host_triplet = i686-pc-linux-gnu
     40subdir = tests/example_scripts/perl
     41DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     42ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     43am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
     44        $(top_srcdir)/m4/ax_check_xml2.m4 \
     45        $(top_srcdir)/m4/ax_check_xmlsec1.m4 \
     46        $(top_srcdir)/m4/ax_pkg_swig.m4 \
     47        $(top_srcdir)/m4/ax_python_devel.m4 \
     48        $(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
     49        $(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
     50        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
     51        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
     52        $(top_srcdir)/configure.ac
     53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     54        $(ACLOCAL_M4)
     55mkinstalldirs = $(install_sh) -d
     56CONFIG_CLEAN_FILES =
     57CONFIG_CLEAN_VPATH_FILES =
     58SOURCES =
     59DIST_SOURCES =
     60DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     61ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
     62AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
     63AR = ar
     64AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
     65AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
     66AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
     67AWK = gawk
     68AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     69AX_SWIG_PYTHON_OPT = -python
     70CC = gcc
     71CCDEPMODE = depmode=gcc3
     72CFLAGS = -g -O2
     73CPP = gcc -E
     74CPPFLAGS =
     75CXX = g++
     76CXXCPP = g++ -E
     77CXXDEPMODE = depmode=gcc3
     78CXXFLAGS = -g -O2
     79CYGPATH_W = echo
     80DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
     81DEPDIR = .deps
     82DSYMUTIL =
     83DUMPBIN =
     84ECHO_C =
     85ECHO_N = -n
     86ECHO_T =
     87EGREP = /bin/grep -E
     88EXEEXT =
     89FGREP = /bin/grep -F
     90GREP = /bin/grep
     91INSTALL = /usr/bin/install -c
     92INSTALL_DATA = ${INSTALL} -m 644
     93INSTALL_PROGRAM = ${INSTALL}
     94INSTALL_SCRIPT = ${INSTALL}
     95INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     96LD = /usr/bin/ld
     97LDFLAGS =
     98LIBOBJS =
     99LIBS =
     100LIBTOOL = $(SHELL) $(top_builddir)/libtool
     101LIPO =
     102LN_S = ln -s
     103LTLIBOBJS =
     104MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
     105MKDIR_P = /bin/mkdir -p
     106NM = /usr/bin/nm -B
     107NMEDIT =
     108OBJDUMP = objdump
     109OBJEXT = o
     110OPENSSL_INCLUDES = 
     111OPENSSL_LDFLAGS = 
     112OPENSSL_LIBS = -lssl -lcrypto 
     113OTOOL =
     114OTOOL64 =
     115PACKAGE = abac
     116PACKAGE_BUGREPORT = faber@ISI.EDU
     117PACKAGE_NAME = ABAC
     118PACKAGE_STRING = ABAC 0.1.5
     119PACKAGE_TARNAME = abac
     120PACKAGE_URL =
     121PACKAGE_VERSION = 0.1.5
     122PATH_SEPARATOR = :
     123PERL = perl
     124PKG_CONFIG = /usr/bin/pkg-config
     125PYTHON = /usr/local/bin/python
     126PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     127PYTHON_EXEC_PREFIX = ${exec_prefix}
     128PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
     129PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
     130PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
     131PYTHON_PLATFORM = linux2
     132PYTHON_PREFIX = ${prefix}
     133PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
     134PYTHON_VERSION = 2.7
     135RANLIB = ranlib
     136SED = /bin/sed
     137SET_MAKE =
     138SHELL = /bin/bash
     139SITE_PERL = /usr/local/lib/site_perl
     140STRIP = strip
     141SWIG = /usr/local/bin/swig -c++
     142SWIG_LIB = /usr/local/share/swig/2.0.4
     143VERSION = 0.1.5
     144XML2_CONFIG = /usr/bin/xml2-config
     145XML2_INCLUDES = -I/usr/include/libxml2
     146XML2_LDFLAGS = -lxml2
     147XML2_LIBS = -lxml2
     148XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
     149XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
     150XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     151XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     152abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts/perl
     153abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts/perl
     154abs_top_builddir = /home/mei/Deter/abac0-master
     155abs_top_srcdir = /home/mei/Deter/abac0-master
     156ac_ct_CC = gcc
     157ac_ct_CXX = g++
     158ac_ct_DUMPBIN =
     159am__include = include
     160am__leading_dot = .
     161am__quote =
     162am__tar = ${AMTAR} chof - "$$tardir"
     163am__untar = ${AMTAR} xf -
     164bindir = ${exec_prefix}/bin
     165build = i686-pc-linux-gnu
     166build_alias =
     167build_cpu = i686
     168build_os = linux-gnu
     169build_vendor = pc
     170builddir = .
     171datadir = ${datarootdir}
     172datarootdir = ${prefix}/share
     173docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
     174dvidir = ${docdir}
     175exec_prefix = ${prefix}
     176host = i686-pc-linux-gnu
     177host_alias =
     178host_cpu = i686
     179host_os = linux-gnu
     180host_vendor = pc
     181htmldir = ${docdir}
     182includedir = ${prefix}/include
     183infodir = ${datarootdir}/info
     184install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
     185libdir = ${exec_prefix}/lib
     186libexecdir = ${exec_prefix}/libexec
     187localedir = ${datarootdir}/locale
     188localstatedir = ${prefix}/var
     189lt_ECHO = echo
     190mandir = ${datarootdir}/man
     191mkdir_p = /bin/mkdir -p
     192oldincludedir = /usr/include
     193pdfdir = ${docdir}
     194pkgpyexecdir = ${pyexecdir}/abac
     195pkgpythondir = ${pythondir}/abac
     196prefix = /usr/local
     197program_transform_name = s,x,x,
     198psdir = ${docdir}
     199pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
     200pythondir = ${prefix}/lib/python2.7/site-packages
     201sbindir = ${exec_prefix}/sbin
     202sharedstatedir = ${prefix}/com
     203srcdir = .
     204sysconfdir = ${prefix}/etc
     205target_alias =
     206top_build_prefix = ../../../
     207top_builddir = ../../..
     208top_srcdir = ../../..
     209INCLUDES = -I$(abs_top_srcdir)/libabac
     210LDADD = $(abs_top_builddir)/libabac/libabac.la
     211CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
     212PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
     213TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
     214PERL_ENV = PERLLIB=$(abs_top_builddir)/swig/perl:$(abs_top_builddir)/swig/perl/.libs
     215MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) $(PERL_ENV)
     216all: all-am
     217
     218.SUFFIXES:
     219$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     220        @for dep in $?; do \
     221          case '$(am__configure_deps)' in \
     222            *$$dep*) \
     223              ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
     224                && { if test -f $@; then exit 0; else break; fi; }; \
     225              exit 1;; \
     226          esac; \
     227        done; \
     228        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/perl/Makefile'; \
     229        $(am__cd) $(top_srcdir) && \
     230          $(AUTOMAKE) --foreign tests/example_scripts/perl/Makefile
     231.PRECIOUS: Makefile
     232Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     233        @case '$?' in \
     234          *config.status*) \
     235            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     236          *) \
     237            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     238            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     239        esac;
     240
     241$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     242        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     243
     244$(top_srcdir)/configure:  $(am__configure_deps)
     245        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     246$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     247        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     248$(am__aclocal_m4_deps):
     249
     250mostlyclean-libtool:
     251        -rm -f *.lo
     252
     253clean-libtool:
     254        -rm -rf .libs _libs
     255tags: TAGS
     256TAGS:
     257
     258ctags: CTAGS
     259CTAGS:
     260
     261
     262distdir: $(DISTFILES)
     263        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     264        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     265        list='$(DISTFILES)'; \
     266          dist_files=`for file in $$list; do echo $$file; done | \
     267          sed -e "s|^$$srcdirstrip/||;t" \
     268              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
     269        case $$dist_files in \
     270          */*) $(MKDIR_P) `echo "$$dist_files" | \
     271                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
     272                           sort -u` ;; \
     273        esac; \
     274        for file in $$dist_files; do \
     275          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
     276          if test -d $$d/$$file; then \
     277            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
     278            if test -d "$(distdir)/$$file"; then \
     279              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     280            fi; \
     281            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
     282              cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
     283              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     284            fi; \
     285            cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     286          else \
     287            test -f "$(distdir)/$$file" \
     288            || cp -p $$d/$$file "$(distdir)/$$file" \
     289            || exit 1; \
     290          fi; \
     291        done
     292check-am: all-am
     293check: check-am
     294all-am: Makefile
     295installdirs:
     296install: install-am
     297install-exec: install-exec-am
     298install-data: install-data-am
     299uninstall: uninstall-am
     300
     301install-am: all-am
     302        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     303
     304installcheck: installcheck-am
     305install-strip:
     306        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     307          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     308          `test -z '$(STRIP)' || \
     309            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     310mostlyclean-generic:
     311
     312clean-generic:
     313
     314distclean-generic:
     315        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     316        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     317
     318maintainer-clean-generic:
     319        @echo "This command is intended for maintainers to use"
     320        @echo "it deletes files that may require special tools to rebuild."
     321clean: clean-am
     322
     323clean-am: clean-generic clean-libtool clean-local mostlyclean-am
     324
     325distclean: distclean-am
     326        -rm -f Makefile
     327distclean-am: clean-am distclean-generic
     328
     329dvi: dvi-am
     330
     331dvi-am:
     332
     333html: html-am
     334
     335html-am:
     336
     337info: info-am
     338
     339info-am:
     340
     341install-data-am:
     342
     343install-dvi: install-dvi-am
     344
     345install-dvi-am:
     346
     347install-exec-am:
     348
     349install-html: install-html-am
     350
     351install-html-am:
     352
     353install-info: install-info-am
     354
     355install-info-am:
     356
     357install-man:
     358
     359install-pdf: install-pdf-am
     360
     361install-pdf-am:
     362
     363install-ps: install-ps-am
     364
     365install-ps-am:
     366
     367installcheck-am:
     368
     369maintainer-clean: maintainer-clean-am
     370        -rm -f Makefile
     371maintainer-clean-am: distclean-am maintainer-clean-generic
     372
     373mostlyclean: mostlyclean-am
     374
     375mostlyclean-am: mostlyclean-generic mostlyclean-libtool
     376
     377pdf: pdf-am
     378
     379pdf-am:
     380
     381ps: ps-am
     382
     383ps-am:
     384
     385uninstall-am:
     386
     387.MAKE: install-am install-strip
     388
     389.PHONY: all all-am check check-am clean clean-generic clean-libtool \
     390        clean-local distclean distclean-generic distclean-libtool \
     391        distdir dvi dvi-am html html-am info info-am install \
     392        install-am install-data install-data-am install-dvi \
     393        install-dvi-am install-exec install-exec-am install-html \
     394        install-html-am install-info install-info-am install-man \
     395        install-pdf install-pdf-am install-ps install-ps-am \
     396        install-strip installcheck installcheck-am installdirs \
     397        maintainer-clean maintainer-clean-generic mostlyclean \
     398        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
     399        uninstall uninstall-am
     400
     401
     402.PHONY: clean-local
     403
    1404all: run bad prove
    2405
    3 clean:
    4         @rm -rf *.pem *.xml *.log
    5 
    6 setup:
    7         creddy --generate --cn IceCream
    8         creddy --generate --cn Chocolate
    9        
     406clean-local:
     407        @rm -rf *.pem *.xml
     408
    10409run:
     410        echo '---running (perl) id script'
    11411        make clean
    12         make setup
    13         ./abac_keyid.pl IceCream_ID.pem 1>id.log 2>&1
     412        $(MY_ENV) ./setup.sh 1>/dev/null 2>&1
     413        (rc=`$(MY_ENV) ./abac_keyid.pl IceCream_ID.pem | grep OKAY` ; \
     414        if [ -z "$$rc" ]; then \
     415          echo "BAD:example_scripts/perl/abac_keyid.pl:using libabac perl to make principal"; \
     416        else \
     417          echo "GOOD:example_scripts/perl/abac_keyid.pl:using libabac perl to make principal"; \
     418        fi)
    14419
    15420bad:
     421        echo '---running (perl) id2 script, expected failure'
    16422        make clean
    17         make setup
    18         ./abac_keyid.pl IceCream_private.pem 1>id2.log 2>&1
     423        $(MY_ENV) ./setup.sh 1>/dev/null 2>&1
     424        (rc=`$(MY_ENV) ./abac_keyid.pl IceCream_private.pem | grep "std::invalid_argument"`; \
     425        if [ -z "$$rc" ]; then \
     426          echo "BAD:example_scripts/perl/abac_keyid.pl:supplied with just privkey"; \
     427        else \
     428          echo "GOOD:example_scripts/perl/abac_keyid.pl:supplied with just privkey"; \
     429        fi)
    19430
    20431attr:
     432        echo '---running (perl) attr script'
    21433        make clean
    22         make setup
    23         ./run_attr 1 >attr.log 2>&1
     434        $(MY_ENV) ./setup.sh 1>/dev/null 2>&1
     435        (rc=`$(MY_ENV) ./run_attr | grep chocolate` ; \
     436        if [ -z "$$rc" ]; then \
     437          echo "BAD:example_scripts/perl/abac_attr.pl:creating attribute"; \
     438        else \
     439          echo "GOOD:example_scripts/perl/abac_keyid.pl:creating attribute"; \
     440        fi)
    24441
    25442prove:
    26         make attr
    27         ./run_prover 1 >prover.log 2>&1
    28 
     443        echo '---running (perl) attr script'
     444        make clean
     445        $(MY_ENV) ./setup.sh 1>/dev/null 2>&1
     446        $(MY_ENV) ./run_attr 1>/dev/null 2>&1
     447        (rc=`$(MY_ENV) ./run_prover | grep Success` ; \
     448        if [ -z "$$rc" ]; then \
     449          echo "BAD:example_scripts/perl/abac_prover.pl:prover in perl"; \
     450        else \
     451          echo "GOOD:example_scripts/perl/abac_prover.pl:prover in perl"; \
     452        fi)
     453
     454# Tell versions [3.59,3.63) of GNU make to not export all variables.
     455# Otherwise a system limit (for SysV at least) may be exceeded.
     456.NOEXPORT:
  • tests/example_scripts/perl/run_prover

    rec550f7 r3c30b59  
    11#!/bin/sh
    22
     3. ${TESTDIR}/test_util.sh
     4
    35keystore=`pwd`
    4 pID=`creddy --keyid --cert ${keystore}/IceCream_ID.pem`
    5 cID=`creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
     6pID=`$eloc/creddy --keyid --cert ${keystore}/IceCream_ID.pem`
     7cID=`$eloc/creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
    68
    79role="${pID}.delicious"
  • tests/example_scripts/python/Makefile

    rec550f7 r3c30b59  
    1 
    2 all: run_attr run_e_attr run_id run_id2 run_prove
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
     2# tests/example_scripts/python/Makefile.  Generated from Makefile.in by configure.
     3
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
     7# This Makefile.in is free software; the Free Software Foundation
     8# gives unlimited permission to copy and/or distribute it,
     9# with or without modifications, as long as this notice is preserved.
     10
     11# This program is distributed in the hope that it will be useful,
     12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     14# PARTICULAR PURPOSE.
     15
     16
     17
     18#
     19# example_scripts/python
     20#
     21
     22pkgdatadir = $(datadir)/abac
     23pkgincludedir = $(includedir)/abac
     24pkglibdir = $(libdir)/abac
     25pkglibexecdir = $(libexecdir)/abac
     26am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
     27install_sh_DATA = $(install_sh) -c -m 644
     28install_sh_PROGRAM = $(install_sh) -c
     29install_sh_SCRIPT = $(install_sh) -c
     30INSTALL_HEADER = $(INSTALL_DATA)
     31transform = $(program_transform_name)
     32NORMAL_INSTALL = :
     33PRE_INSTALL = :
     34POST_INSTALL = :
     35NORMAL_UNINSTALL = :
     36PRE_UNINSTALL = :
     37POST_UNINSTALL = :
     38build_triplet = i686-pc-linux-gnu
     39host_triplet = i686-pc-linux-gnu
     40subdir = tests/example_scripts/python
     41DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     42ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     43am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
     44        $(top_srcdir)/m4/ax_check_xml2.m4 \
     45        $(top_srcdir)/m4/ax_check_xmlsec1.m4 \
     46        $(top_srcdir)/m4/ax_pkg_swig.m4 \
     47        $(top_srcdir)/m4/ax_python_devel.m4 \
     48        $(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
     49        $(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
     50        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
     51        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
     52        $(top_srcdir)/configure.ac
     53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     54        $(ACLOCAL_M4)
     55mkinstalldirs = $(install_sh) -d
     56CONFIG_CLEAN_FILES =
     57CONFIG_CLEAN_VPATH_FILES =
     58SOURCES =
     59DIST_SOURCES =
     60DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     61ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
     62AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
     63AR = ar
     64AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
     65AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
     66AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
     67AWK = gawk
     68AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     69AX_SWIG_PYTHON_OPT = -python
     70CC = gcc
     71CCDEPMODE = depmode=gcc3
     72CFLAGS = -g -O2
     73CPP = gcc -E
     74CPPFLAGS =
     75CXX = g++
     76CXXCPP = g++ -E
     77CXXDEPMODE = depmode=gcc3
     78CXXFLAGS = -g -O2
     79CYGPATH_W = echo
     80DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
     81DEPDIR = .deps
     82DSYMUTIL =
     83DUMPBIN =
     84ECHO_C =
     85ECHO_N = -n
     86ECHO_T =
     87EGREP = /bin/grep -E
     88EXEEXT =
     89FGREP = /bin/grep -F
     90GREP = /bin/grep
     91INSTALL = /usr/bin/install -c
     92INSTALL_DATA = ${INSTALL} -m 644
     93INSTALL_PROGRAM = ${INSTALL}
     94INSTALL_SCRIPT = ${INSTALL}
     95INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     96LD = /usr/bin/ld
     97LDFLAGS =
     98LIBOBJS =
     99LIBS =
     100LIBTOOL = $(SHELL) $(top_builddir)/libtool
     101LIPO =
     102LN_S = ln -s
     103LTLIBOBJS =
     104MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
     105MKDIR_P = /bin/mkdir -p
     106NM = /usr/bin/nm -B
     107NMEDIT =
     108OBJDUMP = objdump
     109OBJEXT = o
     110OPENSSL_INCLUDES = 
     111OPENSSL_LDFLAGS = 
     112OPENSSL_LIBS = -lssl -lcrypto 
     113OTOOL =
     114OTOOL64 =
     115PACKAGE = abac
     116PACKAGE_BUGREPORT = faber@ISI.EDU
     117PACKAGE_NAME = ABAC
     118PACKAGE_STRING = ABAC 0.1.5
     119PACKAGE_TARNAME = abac
     120PACKAGE_URL =
     121PACKAGE_VERSION = 0.1.5
     122PATH_SEPARATOR = :
     123PERL = perl
     124PKG_CONFIG = /usr/bin/pkg-config
     125PYTHON = /usr/local/bin/python
     126PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
     127PYTHON_EXEC_PREFIX = ${exec_prefix}
     128PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
     129PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
     130PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
     131PYTHON_PLATFORM = linux2
     132PYTHON_PREFIX = ${prefix}
     133PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
     134PYTHON_VERSION = 2.7
     135RANLIB = ranlib
     136SED = /bin/sed
     137SET_MAKE =
     138SHELL = /bin/bash
     139SITE_PERL = /usr/local/lib/site_perl
     140STRIP = strip
     141SWIG = /usr/local/bin/swig -c++
     142SWIG_LIB = /usr/local/share/swig/2.0.4
     143VERSION = 0.1.5
     144XML2_CONFIG = /usr/bin/xml2-config
     145XML2_INCLUDES = -I/usr/include/libxml2
     146XML2_LDFLAGS = -lxml2
     147XML2_LIBS = -lxml2
     148XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
     149XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
     150XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     151XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
     152abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts/python
     153abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts/python
     154abs_top_builddir = /home/mei/Deter/abac0-master
     155abs_top_srcdir = /home/mei/Deter/abac0-master
     156ac_ct_CC = gcc
     157ac_ct_CXX = g++
     158ac_ct_DUMPBIN =
     159am__include = include
     160am__leading_dot = .
     161am__quote =
     162am__tar = ${AMTAR} chof - "$$tardir"
     163am__untar = ${AMTAR} xf -
     164bindir = ${exec_prefix}/bin
     165build = i686-pc-linux-gnu
     166build_alias =
     167build_cpu = i686
     168build_os = linux-gnu
     169build_vendor = pc
     170builddir = .
     171datadir = ${datarootdir}
     172datarootdir = ${prefix}/share
     173docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
     174dvidir = ${docdir}
     175exec_prefix = ${prefix}
     176host = i686-pc-linux-gnu
     177host_alias =
     178host_cpu = i686
     179host_os = linux-gnu
     180host_vendor = pc
     181htmldir = ${docdir}
     182includedir = ${prefix}/include
     183infodir = ${datarootdir}/info
     184install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
     185libdir = ${exec_prefix}/lib
     186libexecdir = ${exec_prefix}/libexec
     187localedir = ${datarootdir}/locale
     188localstatedir = ${prefix}/var
     189lt_ECHO = echo
     190mandir = ${datarootdir}/man
     191mkdir_p = /bin/mkdir -p
     192oldincludedir = /usr/include
     193pdfdir = ${docdir}
     194pkgpyexecdir = ${pyexecdir}/abac
     195pkgpythondir = ${pythondir}/abac
     196prefix = /usr/local
     197program_transform_name = s,x,x,
     198psdir = ${docdir}
     199pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
     200pythondir = ${prefix}/lib/python2.7/site-packages
     201sbindir = ${exec_prefix}/sbin
     202sharedstatedir = ${prefix}/com
     203srcdir = .
     204sysconfdir = ${prefix}/etc
     205target_alias =
     206top_build_prefix = ../../../
     207top_builddir = ../../..
     208top_srcdir = ../../..
     209INCLUDES = -I$(abs_top_srcdir)/libabac
     210LDADD = $(abs_top_builddir)/libabac/libabac.la
     211CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
     212PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
     213PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
     214TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
     215MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(PYTHON_ENV) $(TEST_ENV)
     216all: all-am
     217
     218.SUFFIXES:
     219$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     220        @for dep in $?; do \
     221          case '$(am__configure_deps)' in \
     222            *$$dep*) \
     223              ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
     224                && { if test -f $@; then exit 0; else break; fi; }; \
     225              exit 1;; \
     226          esac; \
     227        done; \
     228        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/python/Makefile'; \
     229        $(am__cd) $(top_srcdir) && \
     230          $(AUTOMAKE) --foreign tests/example_scripts/python/Makefile
     231.PRECIOUS: Makefile
     232Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     233        @case '$?' in \
     234          *config.status*) \
     235            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     236          *) \
     237            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     238            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     239        esac;
     240
     241$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     242        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     243
     244$(top_srcdir)/configure:  $(am__configure_deps)
     245        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     246$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     247        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     248$(am__aclocal_m4_deps):
     249
     250mostlyclean-libtool:
     251        -rm -f *.lo
     252
     253clean-libtool:
     254        -rm -rf .libs _libs
     255tags: TAGS
     256TAGS:
     257
     258ctags: CTAGS
     259CTAGS:
     260
     261
     262distdir: $(DISTFILES)
     263        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     264        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
     265        list='$(DISTFILES)'; \
     266          dist_files=`for file in $$list; do echo $$file; done | \
     267          sed -e "s|^$$srcdirstrip/||;t" \
     268              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
     269        case $$dist_files in \
     270          */*) $(MKDIR_P) `echo "$$dist_files" | \
     271                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
     272                           sort -u` ;; \
     273        esac; \
     274        for file in $$dist_files; do \
     275          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
     276          if test -d $$d/$$file; then \
     277            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
     278            if test -d "$(distdir)/$$file"; then \
     279              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     280            fi; \
     281            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
     282              cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
     283              find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     284            fi; \
     285            cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     286          else \
     287            test -f "$(distdir)/$$file" \
     288            || cp -p $$d/$$file "$(distdir)/$$file" \
     289            || exit 1; \
     290          fi; \
     291        done
     292check-am: all-am
     293check: check-am
     294all-am: Makefile
     295installdirs:
     296install: install-am
     297install-exec: install-exec-am
     298install-data: install-data-am
     299uninstall: uninstall-am
     300
     301install-am: all-am
     302        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     303
     304installcheck: installcheck-am
     305install-strip:
     306        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     307          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     308          `test -z '$(STRIP)' || \
     309            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     310mostlyclean-generic:
     311
     312clean-generic:
     313
     314distclean-generic:
     315        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
     316        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     317
     318maintainer-clean-generic:
     319        @echo "This command is intended for maintainers to use"
     320        @echo "it deletes files that may require special tools to rebuild."
     321clean-am: clean-generic clean-libtool mostlyclean-am
     322
     323distclean: distclean-am
     324        -rm -f Makefile
     325distclean-am: clean-am distclean-generic
     326
     327dvi: dvi-am
     328
     329dvi-am:
     330
     331html: html-am
     332
     333html-am:
     334
     335info: info-am
     336
     337info-am:
     338
     339install-data-am:
     340
     341install-dvi: install-dvi-am
     342
     343install-dvi-am:
     344
     345install-exec-am:
     346
     347install-html: install-html-am
     348
     349install-html-am:
     350
     351install-info: install-info-am
     352
     353install-info-am:
     354
     355install-man:
     356
     357install-pdf: install-pdf-am
     358
     359install-pdf-am:
     360
     361install-ps: install-ps-am
     362
     363install-ps-am:
     364
     365installcheck-am:
     366
     367maintainer-clean: maintainer-clean-am
     368        -rm -f Makefile
     369maintainer-clean-am: distclean-am maintainer-clean-generic
     370
     371mostlyclean: mostlyclean-am
     372
     373mostlyclean-am: mostlyclean-generic mostlyclean-libtool
     374
     375pdf: pdf-am
     376
     377pdf-am:
     378
     379ps: ps-am
     380
     381ps-am:
     382
     383uninstall-am:
     384
     385.MAKE: install-am install-strip
     386
     387.PHONY: all all-am check check-am clean clean-generic clean-libtool \
     388        distclean distclean-generic distclean-libtool distdir dvi \
     389        dvi-am html html-am info info-am install install-am \
     390        install-data install-data-am install-dvi install-dvi-am \
     391        install-exec install-exec-am install-html install-html-am \
     392        install-info install-info-am install-man install-pdf \
     393        install-pdf-am install-ps install-ps-am install-strip \
     394        installcheck installcheck-am installdirs maintainer-clean \
     395        maintainer-clean-generic mostlyclean mostlyclean-generic \
     396        mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
     397
     398
     399.PHONY: clean-local
     400
     401all: run_attr run_id run_id2 run_id3 run_prove
    3402
    4403clean:
    5         @rm -f *.pem *.xml *.log pfile
     404        @rm -f *.pem *.xml pfile
    6405
    7406setup:
    8         creddy --generate --cn IceCream
    9         creddy --generate --cn Chocolate
     407        @$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
    10408
    11409run_attr:
    12         make clean
    13         rm -rf attr.log
    14         make setup
    15         ./abac_attr.py IceCream_ID.pem IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>attr.log 2>&1
    16 
    17 run_e_attr:
    18         make clean
    19         rm -rf e_attr.log pfile
    20         echo "dumdum" > pfile
    21         openssl genrsa -des3 -out Soda_private.pem -passout file:pfile
    22         creddy --generate --cn Soda --key Soda_private.pem --p=pfile
    23         creddy --generate --cn Cream
    24         ./abac_e_attr.py Soda_ID.pem Soda_private.pem Soda_attr.xml pfile Cream_ID.pem 1>e_attr.log 2>&1
     410        @echo "---running (python) attr script"
     411        @make clean
     412        @make setup
     413        @(rc=`$(MY_ENV) ./abac_attr.py IceCream_ID.pem IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem |grep success` ; \
     414        if [ -z "$$rc" ]; then \
     415          echo "BAD:example_scripts/python/abac_attr.py:using libabac to create principal/attrs and make a simple query"; \
     416        else \
     417          echo "GOOD:example_scripts/python/abac_attr.py:using libabac to create principal/attrs and make a simple query"; \
     418        fi)
    25419
    26420run_id:
    27         make clean
    28         rm -rf id.log
    29         make setup
    30         ./abac_keyid.py IceCream_ID.pem 1>id.log 2>&1
     421        @echo "---running (python) id script"
     422        @make clean
     423        @make setup
     424        @(rc=`$(MY_ENV) ./abac_keyid.py IceCream_ID.pem | grep okay` ; \
     425        if [ -z "$$rc" ]; then \
     426          echo "BAD:example_scripts/python/abac_keyid.py:using libabac to extract principal"; \
     427        else \
     428          echo "GOOD:example_scripts/python/abac_keyid.py:using libabac to extract principal"; \
     429        fi)
    31430
    32431run_id2:
    33         make clean
    34         rm -rf id2.log
    35         make setup
    36         ./abac_keyid.py IceCream_private.pem 1>id2.log 2>&1
     432        @echo "---running (python) id2 script, expected failure"
     433