diff options
author | Will Storey <will@summercat.com> | 2016-03-13 15:09:52 -0700 |
---|---|---|
committer | Will Storey <will@summercat.com> | 2016-03-13 15:09:52 -0700 |
commit | 8ab6bdf2ce884fa7363272805287c341b2b2fb01 (patch) | |
tree | 8800800d82903a483866c4bee1e5b19f628e9dac /src | |
parent | be733d24824fe2a3502a1e4ab76d50699052dd65 (diff) | |
download | irssi-8ab6bdf2ce884fa7363272805287c341b2b2fb01.zip |
Add clear error calls to irssi_ssl_get_iochannel
Diffstat (limited to 'src')
-rw-r--r-- | src/core/network-openssl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index d0f23253..a18e6fc7 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -473,6 +473,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_ if(!(fd = g_io_channel_unix_get_fd(handle))) return NULL; + ERR_clear_error(); ctx = SSL_CTX_new(SSLv23_client_method()); if (ctx == NULL) { g_error("Could not allocate memory for SSL context"); @@ -491,6 +492,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_ scert = convert_home(mycert); if (mypkey && *mypkey) spkey = convert_home(mypkey); + ERR_clear_error(); if (! SSL_CTX_use_certificate_file(ctx, scert, SSL_FILETYPE_PEM)) g_warning("Loading of client certificate '%s' failed: %s", mycert, ERR_reason_error_string(ERR_get_error())); else if (! SSL_CTX_use_PrivateKey_file(ctx, spkey ? spkey : scert, SSL_FILETYPE_PEM)) |