Migrate all enumerators to venumerate() interface change

This commit is contained in:
Tobias Brunner
2017-05-26 13:56:44 +02:00
parent 16bffa8b55
commit 95a63bf281
68 changed files with 851 additions and 560 deletions
@@ -142,8 +142,14 @@ typedef struct {
METHOD(enumerator_t, crl_enumerate, bool,
crl_enumerator_t *this, chunk_t *serial, time_t *date, crl_reason_t *reason)
crl_enumerator_t *this, va_list args)
{
crl_reason_t *reason;
chunk_t *serial;
time_t *date;
VA_ARGS_VGET(args, serial, date, reason);
if (this->i < this->num)
{
X509_REVOKED *revoked;
@@ -188,7 +194,8 @@ METHOD(crl_t, create_enumerator, enumerator_t*,
INIT(enumerator,
.public = {
.enumerate = (void*)_crl_enumerate,
.enumerate = enumerator_enumerate_default,
.venumerate = _crl_enumerate,
.destroy = (void*)free,
},
.stack = X509_CRL_get_REVOKED(this->crl),
@@ -136,8 +136,12 @@ METHOD(enumerator_t, cert_destroy, void,
}
METHOD(enumerator_t, cert_enumerate, bool,
cert_enumerator_t *this, certificate_t **out)
cert_enumerator_t *this, va_list args)
{
certificate_t **out;
VA_ARGS_VGET(args, out);
if (!this->certs)
{
return FALSE;
@@ -176,7 +180,8 @@ METHOD(pkcs7_t, create_cert_enumerator, enumerator_t*,
{
INIT(enumerator,
.public = {
.enumerate = (void*)_cert_enumerate,
.enumerate = enumerator_enumerate_default,
.venumerate = _cert_enumerate,
.destroy = _cert_destroy,
},
.certs = CMS_get1_certs(this->cms),
@@ -320,8 +325,12 @@ static bool verify_digest(CMS_ContentInfo *cms, CMS_SignerInfo *si, int hash_oid
}
METHOD(enumerator_t, signature_enumerate, bool,
signature_enumerator_t *this, auth_cfg_t **out)
signature_enumerator_t *this, va_list args)
{
auth_cfg_t **out;
VA_ARGS_VGET(args, out);
if (!this->signers)
{
return FALSE;
@@ -382,7 +391,8 @@ METHOD(container_t, create_signature_enumerator, enumerator_t*,
INIT(enumerator,
.public = {
.enumerate = (void*)_signature_enumerate,
.enumerate = enumerator_enumerate_default,
.venumerate = _signature_enumerate,
.destroy = _signature_destroy,
},
.cms = this->cms,