
 * The following procedure will create an index for the ex_data
 * store in the X509 validation context the first time it&#39;s
 * called.  Subsequent calls will return the same index.
 */
static int get_proxy_auth_ex_data_idx(X509_STORE_CTX *ctx)
{
    static volatile int idx = -1;

    if (idx &lt; 0) {
        X509_STORE_lock(X509_STORE_CTX_get0_store(ctx));
        if (idx &lt; 0) {
            idx = X509_STORE_CTX_get_ex_new_index(0,
                                                  &quot;for verify c