Lines Matching refs:certs
110 * @param certs return pointer, free with hx509_certs_free().
120 hx509_lock lock, hx509_certs *certs)
128 *certs = NULL;
169 *certs = c;
177 * @param certs a certificate store to store.
190 hx509_certs certs,
194 if (certs->ops->store == NULL) {
198 certs->ops->name);
202 return (*certs->ops->store)(context, certs, certs->ops_data, flags, lock);
207 hx509_certs_ref(hx509_certs certs)
209 if (certs == NULL)
211 if (certs->ref == 0)
212 _hx509_abort("certs refcount == 0 on ref");
213 if (certs->ref == UINT_MAX)
214 _hx509_abort("certs refcount == UINT_MAX on ref");
215 certs->ref++;
216 return certs;
222 * @param certs certificate store to free.
228 hx509_certs_free(hx509_certs *certs)
230 if (*certs) {
231 if ((*certs)->ref == 0)
233 if (--(*certs)->ref > 0)
236 (*(*certs)->ops->free)(*certs, (*certs)->ops_data);
237 free(*certs);
238 *certs = NULL;
246 * @param certs certificate store to iterate over
259 hx509_certs certs,
264 if (certs->ops->iter_start == NULL) {
267 certs->ops->name);
271 ret = (*certs->ops->iter_start)(context, certs, certs->ops_data, cursor);
283 * @param certs certificate store to iterate over.
295 hx509_certs certs,
300 return (*certs->ops->iter)(context, certs, certs->ops_data, cursor, cert);
307 * @param certs certificate store to iterate over.
317 hx509_certs certs,
320 (*certs->ops->iter_end)(context, certs, certs->ops_data, cursor);
329 * @param certs certificate store to iterate over.
342 hx509_certs certs,
350 ret = hx509_certs_start_seq(context, certs, &cursor);
355 ret = hx509_certs_next_cert(context, certs, cursor, &c);
368 hx509_certs_end_seq(context, certs, cursor);
387 * @param certs certificate store to iterate over.
399 hx509_certs certs,
402 return hx509_certs_iter_f(context, certs, certs_iter, func);
444 * The receiving keyset certs will either increase reference counter
449 * @param certs certificate store to add the certificate to.
458 hx509_certs_add(hx509_context context, hx509_certs certs, hx509_cert cert)
460 if (certs->ops->add == NULL) {
463 certs->ops->name);
467 return (*certs->ops->add)(context, certs, certs->ops_data, cert);
474 * @param certs certificate store to search.
486 hx509_certs certs,
498 if (certs->ops->query)
499 return (*certs->ops->query)(context, certs, certs->ops_data, q, r);
501 ret = hx509_certs_start_seq(context, certs, &cursor);
507 ret = hx509_certs_next_cert(context, certs, cursor, &c);
519 hx509_certs_end_seq(context, certs, cursor);
523 * Return HX509_CERT_NOT_FOUND if no certificate in certs matched
538 * @param certs certificate store to search.
550 hx509_certs certs,
560 ret = hx509_certs_init(context, "MEMORY:filter-certs", 0,
565 ret = hx509_certs_start_seq(context, certs, &cursor);
573 ret = hx509_certs_next_cert(context, certs, cursor, &c);
585 hx509_certs_end_seq(context, certs, cursor);
592 * Return HX509_CERT_NOT_FOUND if no certificate in certs matched
668 * @param certs a certificate store to get the certificate from.
677 hx509_get_one_cert(hx509_context context, hx509_certs certs, hx509_cert *c)
684 ret = hx509_certs_start_seq(context, certs, &cursor);
688 ret = hx509_certs_next_cert(context, certs, cursor, c);
692 hx509_certs_end_seq(context, certs, cursor);
708 * @param certs certificate store to print information about.
721 hx509_certs certs,
730 if (certs->ops->printinfo == NULL) {
731 (*func)(ctx, "No info function for certs");
734 return (*certs->ops->printinfo)(context, certs, certs->ops_data,
757 hx509_certs certs,
760 if (certs->ops->getkeys == NULL) {
764 return (*certs->ops->getkeys)(context, certs, certs->ops_data, keys);
769 hx509_certs certs,
772 if (certs->ops->addkey == NULL) {
776 certs->ops->name);
779 return (*certs->ops->addkey)(context, certs, certs->ops_data, key);