Lines Matching refs:iter
375 struct iter {
386 struct iter *iter;
388 iter = calloc(1, sizeof(*iter));
389 if (iter == NULL) {
400 0, NULL, &iter->certs);
402 free(iter);
408 hx509_certs_free(&iter->certs);
409 free(iter);
427 ret = hx509_certs_add(context, iter->certs, cert);
433 if (iter->certs) {
435 ret = hx509_certs_start_seq(context, iter->certs, &iter->cursor);
437 hx509_certs_free(&iter->certs);
438 free(iter);
447 &iter->searchRef);
449 free(iter);
456 *cursor = iter;
473 struct iter *iter = cursor;
478 if (iter->certs)
479 return hx509_certs_next_cert(context, iter->certs, iter->cursor, cert);
483 ret = SecKeychainSearchCopyNext(iter->searchRef, &itemRef);
561 struct iter *iter = cursor;
563 if (iter->certs) {
564 hx509_certs_end_seq(context, iter->certs, iter->cursor);
565 hx509_certs_free(&iter->certs);
567 CFRelease(iter->searchRef);
570 memset(iter, 0, sizeof(*iter));
571 free(iter);