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
+3 -3
View File
@@ -655,10 +655,10 @@ METHOD(ac_t, get_authKeyIdentifier, chunk_t,
return this->authKeyIdentifier;
}
METHOD(ac_t, get_groups, ietf_attributes_t*,
METHOD(ac_t, create_group_enumerator, enumerator_t*,
private_x509_ac_t *this)
{
return this->groups ? this->groups->get_ref(this->groups) : NULL;
return this->groups->create_enumerator(this->groups);
}
METHOD(certificate_t, get_type, certificate_type_t,
@@ -866,7 +866,7 @@ static private_x509_ac_t *create_empty(void)
.get_holderSerial = _get_holderSerial,
.get_holderIssuer = _get_holderIssuer,
.get_authKeyIdentifier = _get_authKeyIdentifier,
.get_groups = _get_groups,
.create_group_enumerator = _create_group_enumerator,
},
},
.ref = 1,