kssl: SSL READ ERROR: 5
George Staikos
staikos at kde.org
Fri May 17 20:07:18 BST 2002
On Friday 17 May 2002 10:46, Per Winkvist wrote:
> Hi,
>
> > On Thursday 16 May 2002 13:43, Waldo Bastian wrote:
> > > On Thursday 16 May 2002 05:07 am, George Staikos wrote:
> > > > There is a double delete in ~TCPSlaveBase. Hopefully that will fix
> > > > it. I cannot test this so please test.
> > >
> > > The first chunk of the patch is redundant.
>
> What was wrong with the patch that I did ?
> Is it better to set it to 0L and then do a second delete ??
No that was in reference to my patch. Anyways I have applied the
double-delete patch already.
Sorry for not getting back to you yet but I have barely been home at all.
> > I know, I was sleepy. ;) ANyways it seems that it doesn't fix the
> > problem for him, though it does fix a bug I guess.
>
> Since HTTPProtocol::readUnlimited() never returns negative
> int result = read(m_bufReceive.data(), m_bufReceive.size());
> return (result > 0) ? result : 0;
> I assume we will do a lot of looping in HTTPProtocol::readBody() until we
> get signal. This causes all the SSL READ ERROR: 5 messages.
>
> For HTTPProtocol::readUnlimited() In 2.x we returned
> read(m_bufReceive.data(), m_bufReceive.size());
>
>
> Anyway, If I apply the patch below I can login to the bank. (Though some
> problems inside but I've had those in 2.x too)
>
> Per
>
> Index: kssl.cc
> ===================================================================
> RCS file: /home/kde/kdelibs/kio/kssl/kssl.cc,v
> retrieving revision 1.65
> diff -u -3 -p -r1.65 kssl.cc
> --- kssl.cc 2002/04/10 21:56:15 1.65
> +++ kssl.cc 2002/05/17 14:19:28
> @@ -37,7 +37,7 @@
> #endif
>
> #include "kssl.h"
> -
> +#include <errno.h>
> #include <kdebug.h>
> #include <kstandarddirs.h>
> #include <ksock.h>
> @@ -340,10 +340,11 @@ int KSSL::read(void *buf, int len) {
> if (!m_bInit) return -1;
>
> int rc = d->kossl->SSL_read(d->m_ssl, (char *)buf, len);
> + qDebug("KSSL:read rc: %d (%X) len: %d errno:%d", rc, rc, len, errno );
> if (rc <= 0) {
> int err = d->kossl->SSL_get_error(d->m_ssl, rc);
> kdDebug(7029) << "SSL READ ERROR: " << err << endl;
> - if (err != SSL_ERROR_NONE && err != SSL_ERROR_ZERO_RETURN)
> + if (err != SSL_ERROR_NONE && err != SSL_ERROR_ZERO_RETURN && err !=
> SSL_ERROR_SYSCALL)
> rc = -1; // OpenSSL returns 0 on error too
> }
> return rc;
I think this looks ok. I don't know when I can test this, but if it works
for you, I guess it's ok with me to put it into CVS.
Thanks.
--
George Staikos
More information about the kde-core-devel
mailing list