提交 9b2ad94b authored 作者: Brian West's avatar Brian West

FS-6683: [mod_dingaling] iksemel TLS-Fragments #resolve

上级 52728c25
...@@ -785,7 +785,9 @@ iks_recv (iksparser *prs, int timeout) ...@@ -785,7 +785,9 @@ iks_recv (iksparser *prs, int timeout)
#ifdef HAVE_GNUTLS #ifdef HAVE_GNUTLS
if (data->flags & SF_SECURE) { if (data->flags & SF_SECURE) {
len = gnutls_record_recv (data->sess, data->buf, NET_IO_BUF_SIZE - 1); len = gnutls_record_recv (data->sess, data->buf, NET_IO_BUF_SIZE - 1);
if (len == 0) len = -1; if (len > 0 && len < 5) {
len += gnutls_record_recv (data->sess, data->buf + len, NET_IO_BUF_SIZE - 1 - len);
} else if (len == 0) len = -1;
} else } else
#elif HAVE_SSL #elif HAVE_SSL
if (data->flags & SF_SECURE) { if (data->flags & SF_SECURE) {
...@@ -797,6 +799,9 @@ iks_recv (iksparser *prs, int timeout) ...@@ -797,6 +799,9 @@ iks_recv (iksparser *prs, int timeout)
return IKS_OK; return IKS_OK;
} else { } else {
len = SSL_read(data->ssl, data->buf, NET_IO_BUF_SIZE - 1); len = SSL_read(data->ssl, data->buf, NET_IO_BUF_SIZE - 1);
if (len > 0 && len < 5) {
len += SSL_read(data->ssl, data->buf + len, NET_IO_BUF_SIZE - 1 - len);
}
} }
if( len <= 0 ) if( len <= 0 )
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论