Index: doc/API
===================================================================
--- doc/API	(revision f30b1e9dd84f1454b1360614df3a9c1298278bb8)
+++ doc/API	(revision e197b659dea526e53c0ec8188735f9db7fa7b5b2)
@@ -1,216 +1,332 @@
 C++ API
 
-(see bottom for notes on C, Perl, and Python.)
+(see bottom for notes on C, Perl, Python and Java)
 
 ABAC::abac_chunk_t
-    unsigned char *data
-    int len
-
-    structure, represents a blob of memory
-    used to load/return DER-encoded X509 certificates
+   Structure, represents a blob of memory
+   used to load/return Identity credentials and Attribute certificates
+     -unsigned char *data
+     -int len
+
+ABAC::Role
+   A Role, most calls are rarely used outside the library 
+
+   Role()
+     default constructor, do not use, for swig only
+
+   Role(abac_role_t*)
+     copy constructor, used for cloning an Role
+     (C:abac_role_dup)
+
+   Role(char *)
+     instantiate a role from a string
+     (C:abac_role_from_string)
+
+   Role(const Role &)
+     copy constructor, used for cloning an Role
+     (C:abac_role_dup)
+
+   ~Role()
+     default destructor
+     (C:abac_role_free)
+
+   bool is_principal()
+     (C:abac_role_is_principal)
+
+   bool is_role()
+     (C:abac_role_is_role)
+
+   bool is_linking()
+     (C:abac_role_is_linking)
+     indicates the type of role encoded
+
+   char* string()
+     string representation of the role
+     (C:abac_role_string)
+
+   char* linked_role()
+     the linked role of a linking role
+     i.e., A.r1.r2, linked_role() returns A.r1
+     (C:abac_role_linked_role)
+
+   char* role_name()
+     the role name of any role (the part after the last dot)
+     (C:abac_role_role_name)
+
+   char* principal()
+     the principal part of any role
+     (C:abac_role_principal)
+
+ABAC::Credential
+   This is never instantiated directly. These will only ever be
+   returned as a result of calls to Context::query or
+   Context::credentials.
+
+   Credential()
+     default constructor, do not use, for swig only
+
+   Credential(abac_credential_t*)
+     copy constructor, used for cloning a credential
+     (C:abac_credential_head)
+     (C:abac_credential_tail)
+     (C:abac_credential_dup)
+
+   Credential(const Credential&)
+     copy constructor, used for cloning a credential
+     (C:abac_credential_head)
+     (C:abac_credential_tail)
+     (C:abac_credential_dup)
+
+   ~Credential()
+     default destructor
+     (C:abac_credential_free)
+
+   Role &head()
+     returns the head of the credential
+
+   Role &tail()
+     returns the tail of the credential
+
+   abac_chunk_t attribute_cert()
+     returns the attribute certificate in chunk, suitable for
+     transmission over the network or storage in a file
+     (C:abac_credential_attribute_cert)
+
+   abac_chunk_t issuer_cert()
+     returns the issuer certificate in chunk, again suitable for
+     network transmission or file storage
+     (C:abac_credential_issuer_cert)
 
 ABAC::Context
-    Context()
-        default constructor, takes no argument
-    Context(const Context &ctx)
-        copy constructor, used for cloning the context
-
-    int load_id_chunk(abac_chunk_t chunk)
-    int load_id_file(char *filename)
-        load an identity certificate, returns:
-            ABAC_CERT_SUCCESS   successfully loaded
-            ABAC_CERT_INVALID   invalid certificate (or file not found)
-            ABAC_CERT_BAD_SIG   invalid signature
-
-    int load_attribute_chunk(abac_chunk_t chunk)
-    int load_attribute_file(char *filename)
-        load an attribute certificate, returns the same values as above
-        * additionally can return ABAC_CERT_MISSING_ISSUER if the issuer
-          certificate has not been loaded
-
-    void load_directory(char *path)
-        load a directory full of certificates:
-            first: ${path}/*_ID.{der,pem} as identity certificates
-            then: ${path}/*_attr.der as attribute certificates
-
-    std::vector<Credential> query(char *role, char *principal, bool &success)
-        run the query:
-            role <-?- principal
-        returns true/false in success
-        returns a proof upon success, partial proof on failure
-
-    std::vector<Credential> credentials()
-        returns a vector of all the credentials loaded in the context
-
-ABAC::Credential
-    This is never instantiated directly. These will only ever be
-    returned as a result of calls to Context::query or
-    Context::credentials.
-
-    Role &head()
-    Role &tail()
-        returns the head or tail of the credential
-        see below for Role object
-
-    abac_chunk_t attribute_cert()
-        returns the DER-encoded attribute certificate, suitable for
-        transmission over the network or storage in a file
-
-    abac_chunk_t issuer_cert()
-        returns the DER-encoded issuer certificate, again suitable for
-        network transmission or file storage
-
-ABAC::Role
-    Role(const Role &role)
-        copy constructor, clones the role
-
-    char *string()
-        returns a string representation of the role
-
-    the following are rarely used outside the library:
-
-    Role(char *role_name)
-        instantiate a role from a string
-
-    bool is_principal()
-    bool is_role()
-    bool is_linking()
-        indicates the type of role encoded
-
-    char *principal()
-        returns the principal part of any role
-    char *role_name()
-        returns the role name of any role (the part after the last dot)
-    char *linked_role()
-        returns the linked role of a linking role
-        i.e., A.r1.r2, linked_role() returns A.r1
+    An ABAC Context
+
+   Context()
+     default constructor
+     (C:abac_context_new)
+
+   Context(const Context &)
+     copy constructor, used for cloning the context
+     (C:abac_context_dup)
+
+   ~Context()
+     default destructor
+     (C:abac_context_free)
+
+   int load_id_file(char *)
+     load identity certificate from an id file
+     (C:abac_context_load_id_file)
+
+   int load_id_chunk(abac_chunk_t)
+     load id certificate from an chunk
+     (C:abac_context_load_id_chunk)
+
+   int load_attribute_file(char *)
+     load attribute certificate from an id file. 
+     (C:abac_context_load_attribute_file)
+
+   int load_attribute_chunk(abac_chunk_t)
+     load attribute certificate from an chunk
+     (C:abac_context_load_attribute_chunk)
+
+   returns : 
+        ABAC_CERT_SUCCESS   successfully loaded
+        ABAC_CERT_INVALID   invalid certificate (or file not found)
+        ABAC_CERT_BAD_SIG   invalid signature
+
+   void load_directory(char *)
+     load a directory full of certificates:
+
+        first: ${path}/*_ID.{der,pem} as identity certificates
+               implicitly looking for ${path}/*_private.{der,pem} as
+               the private key file
+        last: ${path}/*_attr.xml as attribute certificates
+      (C:abac_context_load_directory)
+
+   std::vector<Attribute> query(char *, char *, bool &)
+     run the query:
+        role <-?- principal
+     returns true/false in success
+     returns a proof upon success, partial proof on failure
+     (C:abac_context_query)
+     (C::abac_free_credentials_free)
+
+   std::vector<Attribute> credentials(bool &)
+     returns a vector of all the credentials loaded in the context
+     (C:abac_context_credentials)
+     (C::abac_context_credentials_free)
 
 ABAC::ID
-    ID(char *filename)
-        load an ID cert from a file
-        Will throw an exception if the cert cannot be loaded
-
-    ID(char *cn, int validity)
-        generates a new ID with the supplied CN and validity period
-        - CN must be alphanumeric and begin with a letter
-        - validity must be at least one second
-        Will throw an exception if either of the above is violated
-
-    void load_privkey(char *filename)
-        loads the private key associated with the cert
-        will throw an exception if the key cannot be loaded
-
-    char *keyid()
-        returns the SHA1 keyid of the cert
-
-    char *cert_filename()
-        returns a suggested filename for the generated ID cert, namely:
-            ${CN}_id.pem
-
-    char *privkey_filename()
-        returns a suggested filename for the private key of the ID cert:
-            ${CN}_key.pem
-
-    void write_cert(FILE *out)
-        writes a PEM-encoded cert to the file handle
-
-    void write_cert(string& out)
-        writes a PEM-encoded cert to a file named out
-
-    void write_cert(char *out)
-        writes a PEM-encoded cert to a file named out
-
-    void write_privkey(FILE *out)
-        writes a PEM-encoded private key to the file handle
-        throws an exception if no private key is loaded
-
-    void write_privkey(string& out)
-        writes a PEM-encoded private key to a file named out
-        throws an exception if no private key is loaded
-
-    void write_privkey(char *out)
-        writes a PEM-encoded private key a file named out
-        throws an exception if no private key is loaded
-
-    abac_chunk_t cert_chunk()
-        returns a DER-encoded binary representation of the X.509 ID cert
-        associated with this ID.
-        can be passed to libabac's Context::load_id_chunk()
-
-    In languages where swig is confused by overloading, the write_* functions 
-        are replaced with (for example) write_cert(FILE *) and 
-        write_cert_name(char*) to remove the ambiguity.  perl and python
-        use these names, and perl uses only the write_cert_name() forms.
+   An ID holds a principal credential. It maybe imported from an existing
+   ID credential via external files, constructed from a streaming chunk,
+   or instantiated on the fly
+
+   ID()
+     default constructor, do not use, for swig only
+
+   ID(const ID &)
+     copy constructor, used for cloning an ID
+     (C:abac_id_dup)
+
+   ~ID()
+     default destructor
+     (C:abac_id_free)
+
+   ID(char *)
+     load an ID certificate from a file, will throw an exception
+     if the certificate cannot be loaded
+     (C:abac_id_from_file)
+
+   ID_chunk(abac_chunk_t chunk)
+     create an ID certificate from an certificate chunk, will
+     throw an exception if the certificate cannot be loaded
+     (C:abac_id_from_chunk)
+
+   ID(char *,int)
+     generates a new ID(cert&key) with the supplied CN and validity period
+     - CN must be alphanumeric and begin with a letter
+     - validity must be at least one second
+     will throw an exception if either of the above is violated
+     (C:abac_id_generate)
+
+   void id_load_privkey_file(char *)
+     loads the private key associated with the ID credential,
+     will throw an exception if the key cannot be loaded
+     (C:abac_id_privkey_from_file)
+
+   char *keyid()
+     returns the SHA1 keyid of the id cert
+     (C:abac_id_keyid)
+
+   char *cert_filename()
+     returns the default libabac filename for the cert. 
+     value must be freed by caller.
+     (C:abac_id_cert_filename)
+
+   void write_cert(FILE *)
+     writes a PEM-encoded certificate to a file handle
+     (C:abac_id_write_cert)
+
+   void write_cert(string &)
+     writes a PEM-encoded certificate to a file named in string
+
+   void write_cert_file(string &)
+     writes a PEM-encoded certificate to a file
+
+   char *privkey_filename()
+     returns the default libabac filename for the private key. 
+     value must be freed by caller.
+     (C:abac_id_privkey_filename)
+
+   void write_cert(FILE *)
+     write the private key to a file handle
+     throws a std::logic_error if no private key is loaded
+     (C:abac_id_write_privkey)
+
+   void write_cert(string &)
+     writes a private key to file named in string
+
+   void write_cert_file(string &)
+     writes a private key to a file
+
+   abac_chunk_t cert_chunk()
+     returns a DER-encoded binary representation of the X.509 ID cert
+     associated with this ID.
+     can be passed to libabac's Context::load_id_chunk()
+     (C:abac_id_cert_chunk)
+
+   abac_chunk_t privkey_chunk()
+     returns a PEM-encoded binary representation of the private key
+     associated with this ID.
+     (C:abac_id_privkey_chunk)
 
 ABAC::Attribute
-
-    N.B., The way you use this class is by instantiating the object, adding
-    subjects to it, and then baking it. Only once it's baked can you access the
-    X.509 cert. Once it's been baked you can no longer add subjects to it.
-
-    Attribute(ID &issuer, char *role, int validity)
-        Create an object to be signed by the given issuer with the given role
-        and validity period
-        An exception will be thrown if:
-            - the issuer has no private key
-            - the role name is invalid (must be alphanumeric)
-            - the validity period is invalid (must be >= 1 second)
-
-    (The following three methods will throw an exception if the certificate has
-    been baked. They return false if there's an invalid principal or role name.)
-
-    bool principal(char *keyid)
-        Add a principal subject
-
-    bool role(char *keyid, char *role)
-        Add a role subject
-
-    bool linking_role(char *keyid, char *role, char *linked)
-        Add a linking role subject
-
-    bool bake()
-        Generate the cert. Call this after you've added subjects to your cert.
-        This returns false if there are no subjects
-        This will throw an exception if the cert's already been baked.
-
-    bool baked()
-        Returns true iff the cert has been baked.
-
-    void write(FILE *out)
-        Write the DER-encoded X.509 attribute cert to the open file handle
-        Throws an exception if the cert isn't baked
-
-    void write(string& out)
-        Write the DER-encoded X.509 attribute cert to a file named out
-        Throws an exception if the cert isn't baked
-
-    void write(char *out)
-        Write the DER-encoded X.509 attribute cert to a file named out
-        Throws an exception if the cert isn't baked
-
-    abac_chunk_t cert_chunk()
-        returns a DER-encoded binary representation of the X.509 attribute
-        cert associated with this cert
-        Throws an exception if the cert isn't baked
-        the chunk can be passed to libabac's Context::load_attribute_chunk()
-
+   This is the attribute representation for the access policy rule
+       LHS <- RHS
+   The sequence of generation is to
+       first, instantiate the object, ie, LHS (head)
+       second, adding subject(s) to it, ie, RHS (tail)
+       and then baking it.
+   Only once it's baked can you access the X.509 cert.
+   Once it's been baked you can no longer add subjects to it
+
+   Attribute()
+     default constructor, do not use, for swig only
+
+   ~Attribute()
+     default destructor
+     (C:abac_attribute_free)
+
+   Attribute(ID&, char*,int)
+     constructor that creates an attribute policy to be signed by the issuer
+     with the given role with a specified validity period
+     An exception will be thrown if:
+       - the issuer has no private key
+       - the Head role is invalid
+       - the validity period is invalid (must be >= 0 second)
+       - The issuer is invalid
+     (C:abac_attribute_create)
+
+   bool principal(char *) 
+     validate the principal and insert into the attribute
+     throw a std::logic_error if the cert's been baked and keyid bad
+     (C:abac_attribute_principal)
+
+  bool role(char *, char *)
+     validate the principal and role and insert into the attribute
+     throw a std::logic_error if the cert's been baked and keyid bad
+     (C:abac_attribute_role)
+
+  bool linkig_role(char *, char *)
+     validate the role and linking role and insert into the attribute
+     throw a std::logic_error if the cert's been baked and keyid bad
+     (C:abac_attribute_linking_role)
+
+   bool bake()
+     Generate the cert. Call this after you've added subjects to your cert.
+     This returns false if there are no subjects
+     This will throw an exception if the cert's already been baked.
+     (C:abac_attribute_bake)
+
+   bool baked()
+     returns true iff the certificate has been baked.
+     (C:abac_attribute_baked)
+
+   void write(FILE *)
+     write an attribute certificate in XML to an open file handle
+     Throws an exception if the certificate isn't baked
+     (C:abac_attribute_write)
+
+   void write(const string&)
+     write an attribute certificate in XML to file named in string
+
+   void write_file(const char *)
+     write an attribute certificate in XML to file
+
+   abac_chunk_t cert_chunk()
+     returns a XML structure of the attribute certificate in a abac_chunk_t
+     Throws an exception if the certificate isn't baked
+     the chunk can be passed to libabac's Context::load_attribute_chunk()
+     (C:abac_attribute_cert_chunk)
 C API
 
 The C API is nearly identical to the C++ API. Due to lack of namespaces,
 all function names are preceeded by abac_. Furthermore, the parameter
-representing the object must be passed explicitly.
-
-Example:
-
-    C++:    ctx.load_attribute_file("test_attr.der");
-    C:      abac_context_load_attribute_file(ctx, "test_attr.der");
-
-    C++:    id.load_privkey("test_key.pem");
-    C:      ret = abac_id_load_privkey(id, "test_key.pem");
-
-Instead of copy constructors, the C API uses _dup. Therefore, to copy a
-role use abac_role_dup(role_t *), to copy a context use
-abac_context_dup(context_t *), and to copy a credential use
-abac_credential_dup(abac_credential_t *).
+representing the object must be passed explicitly. Each of the C++ calls
+are appended with a matching C routine call. The C function declaration 
+can be found in abac.h
+
+Examples:
+
+    C++:    head.role_name()
+    C:      abac_role_name(head)
+    or 
+    C++:    ctxt.load_attribute_file("test_attr.der")
+    C:      abac_context_load_attribute_file(ctxt, "test_attr.der")
+
+Instead of copy constructors, the C API uses _dup.  Therefore,
+to copy a role use abac_role_dup(m_role), 
+to copy a context use abac_context_dup(m_ctxt),
+to copy a ID use abac_id_dup(m_id) 
+and to copy an attribute use abac_attribute_dup(m_attr)
 
 abac_context_query() and abac_context_credentials() return
@@ -219,10 +335,16 @@
 abac_context_credentials_free().
 
-PERL AND PYTHON API
-
-The Perl and Python APIs are even more similar to the C++ API. The main
+PERL, PYTHON AND JAVA API
+
+The Perl, Python and Java APIs are even more similar to the C++ API. The main
 changes are the use of native types instead of C/C++ types.
 
     - native strings instead of char *
+
+    Java:
+        - String instead of char * 
+        - Context::query returns a vector of Credentials:
+            credentials = ctxt.query(role, principal)
+            success if credentials' size is > 0
 
     Perl:
@@ -230,5 +352,5 @@
         - string instead of chunk_t
         - Context::query returns a list of two elements:
-            my ($success, $credentials) = $ctx->query($role, $principal);
+            my ($success, $credentials) = $ctxt->query($role, $principal)
             $success is a boolean
             $credentials is an arrayref of Credential objects
@@ -239,5 +361,6 @@
         - string instead of chunk_t (< 2.6)
         - Context::query returns a tuple with two elements:
-            (success, credentials) = ctx.query(role, principal)
+            (success, credentials) = ctxt.query(role, principal)
             success is a boolean
             credentials is a tuple of Credential objects
+
Index: doc/ChangeLog
===================================================================
--- doc/ChangeLog	(revision e197b659dea526e53c0ec8188735f9db7fa7b5b2)
+++ doc/ChangeLog	(revision e197b659dea526e53c0ec8188735f9db7fa7b5b2)
@@ -0,0 +1,37 @@
+= 0.1.4 =
+
+    2013-05-XX
+        * removed libabac's dependency on libstrongswan 
+          for credential manipulation
+        * implemented a library using openssl for access to
+          X.509 identity credentials
+        * implemented a library using xmlsec1 for access to
+          attribute credentials in XML format
+        * libcreddy refactored into libabac and removed
+        * creddy rewritten to use libabac
+        * exapanded examples to include scripts in python/perl/java 
+
+= 0.1.3 =
+
+     2011-03-30
+
+        * native Java support
+        * many, many bugfixes
+
+= 0.1.2 =
+
+     2010-10-01
+
+        * libcreddy extracted
+        * credddy rewritten to use libcreddy
+        * sample code for libcreddy in python
+
+= 0.1.1 =
+
+     2010-09-17, updated 2010-09-20
+
+        * Support for intersection rules
+        * Support for encrypted private keys
+        * Build issues on FreeBSD addressed
+
+
Index: doc/extract_doc.c
===================================================================
--- doc/extract_doc.c	(revision e197b659dea526e53c0ec8188735f9db7fa7b5b2)
+++ doc/extract_doc.c	(revision e197b659dea526e53c0ec8188735f9db7fa7b5b2)
@@ -0,0 +1,192 @@
+/***
+   extract_doc.c,
+
+   This program extracts API doc from libabac/abac.hh and
+   generates header file ABAC_HH
+   This program assumes abac.hh is local or linked locally
+  
+rules:
+1) Enclosed lines within slashes with triple stars(/***,***SLASH/) need 
+to be extracted
+2) line start with 'f', add a new line
+3) Enclosed lines with tripple stars and 2 i's (/*ii**. **ii*SLASH/)
+are internal functions, no need to put in API file
+   
+   cc extract_doc.c
+
+***/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+char *sstr="/***";
+char *estr="***/";
+char *prestr="/***PRE";
+char *poststr="/***POST";
+
+void extract_p(FILE *in, FILE* out, char *match)
+{
+    rewind(in);
+    int yes=0;
+    char *line=NULL;
+    size_t num=0;
+    int n=strlen(match);
+    int nn=strlen(estr);
+    while(getline(&line,&num,in) != -1) {
+       if(!yes) {
+          if(strncmp(match,line,n)==0) {
+            yes=1;
+            free(line); line=NULL;
+            continue;
+            } else {
+                free(line);
+                line=NULL;
+          }
+          }else {
+              if(strncmp(estr,line, nn)==0) {
+                yes=0;
+                free(line);
+                line=NULL;
+                break;
+                } else {
+                   fprintf(out,"%s",line);
+                   free(line);
+                   line=NULL;
+              }
+       }
+    }
+}
+
+void extract(FILE* in, FILE* out, FILE *cout)
+{
+    int yes=0;
+    char *line=NULL;
+    size_t num=0;
+    int n=strlen(sstr);
+    int nn=strlen(estr);
+    while(getline(&line,&num,in) != -1) {
+       if(!yes) {
+          if(strncmp(sstr,line, n)==0) {
+            yes=1;
+            free(line); line=NULL;
+            continue;
+            } else {
+                fprintf(cout,"%s",line);
+                free(line);
+                line=NULL;
+          }
+          }else {
+              if(strncmp(estr,line, nn)==0) {
+                yes=0;
+                free(line);
+                line=NULL;
+                continue;
+                } else {
+                   if(line[0]=='f') {
+                       line[0]=' ';
+                       fprintf(out,"\n");
+                   }
+                   if(line[0]=='A') fprintf(out,"\n");
+                   fprintf(out,"%s",line);
+                   free(line);
+                   line=NULL;
+              }
+       }
+    }
+}
+
+int main()
+{
+   char *selfname="extract_doc.c";
+   char *filename="abac.hh";
+   char *docname="API";
+   char *codename="ABAC_HH";
+
+   FILE *dfp=fopen(selfname,"r");
+   FILE *fp=fopen(filename,"r");
+   FILE *ofp=fopen(docname,"w");
+   FILE *cfp=fopen(codename,"w");
+   if(fp && dfp && ofp && cfp ) {
+       extract_p(dfp,ofp,prestr);
+       extract(fp,ofp,cfp);
+       extract_p(dfp,ofp,poststr);
+       fclose(fp);
+       fclose(dfp);
+       fclose(ofp);
+       fclose(cfp);
+   }
+   return 0;
+}
+
+/***PRE
+C++ API
+
+(see bottom for notes on C, Perl, Python and Java)
+
+ABAC::abac_chunk_t
+   Structure, represents a blob of memory
+   used to load/return Identity credentials and Attribute certificates
+     -unsigned char *data
+     -int len
+***/
+
+
+/***POST
+C API
+
+The C API is nearly identical to the C++ API. Due to lack of namespaces,
+all function names are preceeded by abac_. Furthermore, the parameter
+representing the object must be passed explicitly. Each of the C++ calls
+are appended with a matching C routine call. The C function declaration 
+can be found in abac.h
+
+Examples:
+
+    C++:    head.role_name()
+    C:      abac_role_name(head)
+    or 
+    C++:    ctxt.load_attribute_file("test_attr.der")
+    C:      abac_context_load_attribute_file(ctxt, "test_attr.der")
+
+Instead of copy constructors, the C API uses _dup.  Therefore,
+to copy a role use abac_role_dup(m_role), 
+to copy a context use abac_context_dup(m_ctxt),
+to copy a ID use abac_id_dup(m_id) 
+and to copy an attribute use abac_attribute_dup(m_attr)
+
+abac_context_query() and abac_context_credentials() return
+NULL-terminated arrays of Credential objects (abac_credential_t * in C).
+When you are done with them, you must free the whole array at once using
+abac_context_credentials_free().
+
+PERL, PYTHON AND JAVA API
+
+The Perl, Python and Java APIs are even more similar to the C++ API. The main
+changes are the use of native types instead of C/C++ types.
+
+    - native strings instead of char *
+
+    Java:
+        - String instead of char * 
+        - Context::query returns a vector of Credentials:
+            credentials = ctxt.query(role, principal)
+            success if credentials' size is > 0
+
+    Perl:
+        - arrayref instead of vector
+        - string instead of chunk_t
+        - Context::query returns a list of two elements:
+            my ($success, $credentials) = $ctxt->query($role, $principal)
+            $success is a boolean
+            $credentials is an arrayref of Credential objects
+
+    Python:
+        - tuple instead of vector
+        - bytearray instead of chunk_t (>= 2.6)
+        - string instead of chunk_t (< 2.6)
+        - Context::query returns a tuple with two elements:
+            (success, credentials) = ctxt.query(role, principal)
+            success is a boolean
+            credentials is a tuple of Credential objects
+
+***/
