mirror of https://git.kore.io/kore.git
Call ERR_clear_error() before SSL_read() and SSL_write() calls.
This commit is contained in:
parent
16166d37bd
commit
cb13190e0d
|
@ -281,6 +281,7 @@ net_write_ssl(struct connection *c, int len, int *written)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
ERR_clear_error();
|
||||||
r = SSL_write(c->ssl, (c->snb->buf + c->snb->s_off), len);
|
r = SSL_write(c->ssl, (c->snb->buf + c->snb->s_off), len);
|
||||||
if (c->tls_reneg > 1)
|
if (c->tls_reneg > 1)
|
||||||
return (KORE_RESULT_ERROR);
|
return (KORE_RESULT_ERROR);
|
||||||
|
@ -321,6 +322,7 @@ net_read_ssl(struct connection *c, int *bytes)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
ERR_clear_error();
|
||||||
r = SSL_read(c->ssl, (c->rnb->buf + c->rnb->s_off),
|
r = SSL_read(c->ssl, (c->rnb->buf + c->rnb->s_off),
|
||||||
(c->rnb->b_len - c->rnb->s_off));
|
(c->rnb->b_len - c->rnb->s_off));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue