mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
Increment the X509_STORE refcount during the connection
OpenSSL doesn't increment the reference count when the store is assigned to a SSL_CTX.
This commit is contained in:
parent
24ad80177b
commit
96d5a4669d
1 changed files with 4 additions and 0 deletions
|
|
@ -510,6 +510,10 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_
|
|||
g_free(scapath);
|
||||
verify = TRUE;
|
||||
} else if (store != NULL) {
|
||||
/* Make sure to increment the refcount every time the store is
|
||||
* used, that's essential not to get it free'd by OpenSSL when
|
||||
* the SSL_CTX is destroyed. */
|
||||
X509_STORE_up_ref(store);
|
||||
SSL_CTX_set_cert_store(ctx, store);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue