cert_ext
static struct cert_ext *cert_ext;
cert_ext = xreallocarray(cert_ext, ncert_ext + 1, sizeof(*cert_ext));
cert_ext[ncert_ext].key = xstrdup(key);
cert_ext[ncert_ext].val = value == NULL ? NULL : xstrdup(value);
cert_ext[ncert_ext].crit = iscrit;
const struct cert_ext *a = (const struct cert_ext *)_a;
const struct cert_ext *b = (const struct cert_ext *)_b;
const struct cert_ext *ext;
ext = &cert_ext[i];
qsort(cert_ext, ncert_ext, sizeof(*cert_ext), cert_ext_cmp);