diff options
Diffstat (limited to '')
-rw-r--r-- | src/ssl_sock.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 6fbabb4..c7403b8 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -1128,7 +1128,6 @@ static int ssl_sock_load_ocsp(const char *path, SSL_CTX *ctx, struct ckch_data * struct buffer *ocsp_uri = get_trash_chunk(); char *err = NULL; size_t path_len; - int inc_refcount_store = 0; x = data->cert; if (!x) @@ -1164,10 +1163,8 @@ static int ssl_sock_load_ocsp(const char *path, SSL_CTX *ctx, struct ckch_data * if (!issuer) goto out; - if (!data->ocsp_cid) { + if (!data->ocsp_cid) data->ocsp_cid = OCSP_cert_to_id(0, x, issuer); - inc_refcount_store = 1; - } if (!data->ocsp_cid) goto out; @@ -1194,9 +1191,6 @@ static int ssl_sock_load_ocsp(const char *path, SSL_CTX *ctx, struct ckch_data * #endif SSL_CTX_get_tlsext_status_cb(ctx, &callback); - if (inc_refcount_store) - iocsp->refcount_store++; - if (!callback) { struct ocsp_cbk_arg *cb_arg; EVP_PKEY *pkey; @@ -1207,7 +1201,7 @@ static int ssl_sock_load_ocsp(const char *path, SSL_CTX *ctx, struct ckch_data * cb_arg->is_single = 1; cb_arg->s_ocsp = iocsp; - iocsp->refcount_instance++; + iocsp->refcount++; pkey = X509_get_pubkey(x); cb_arg->single_kt = EVP_PKEY_base_id(pkey); @@ -1247,7 +1241,7 @@ static int ssl_sock_load_ocsp(const char *path, SSL_CTX *ctx, struct ckch_data * index = ssl_sock_get_ocsp_arg_kt_index(key_type); if (index >= 0 && !cb_arg->m_ocsp[index]) { cb_arg->m_ocsp[index] = iocsp; - iocsp->refcount_instance++; + iocsp->refcount++; } } HA_SPIN_UNLOCK(OCSP_LOCK, &ocsp_tree_lock); |