x509: Replace fixed acert group string getter by a more dynamic group enumerator

This commit is contained in:
Martin Willi
2014-03-31 11:14:58 +02:00
parent a9bfd4b055
commit 61b2d815b9
5 changed files with 131 additions and 69 deletions
@@ -27,6 +27,16 @@
#include <credentials/ietf_attributes/ietf_attributes.h>
typedef struct ac_t ac_t;
typedef enum ac_group_type_t ac_group_type_t;
/**
* Common group types, from IETF Attributes Syntax
*/
enum ac_group_type_t {
AC_GROUP_TYPE_OCTETS,
AC_GROUP_TYPE_STRING,
AC_GROUP_TYPE_OID,
};
/**
* X.509 attribute certificate interface.
@@ -70,11 +80,11 @@ struct ac_t {
chunk_t (*get_authKeyIdentifier)(ac_t *this);
/**
* Get the group memberships as a list of IETF attributes
* Create an enumerator of contained Group memberships.
*
* @return object containing a list of IETF attributes
* @return enumerator over (ac_group_type_t, chunk_t)
*/
ietf_attributes_t* (*get_groups)(ac_t *this);
enumerator_t* (*create_group_enumerator)(ac_t *this);
};
#endif /** AC_H_ @}*/