[Interest] ssl socket still encrypted after disconnect

Thiago Macieira thiago.macieira at intel.com
Fri Sep 27 20:30:47 CEST 2013


On sexta-feira, 27 de setembro de 2013 09:51:11, Francesco Lamonica wrote:
> Hi all, i am experimenting a strange behaviour with QSslsocket (Qt 4.8.1)
> i create a QSslsocket and feed it with a connected socket descriptor (i
> need to explicitgly choose the src ip); then i call startClientEncryption()
> and all works well. Then the server crashes and a timer in my code will
> fire up the connection mechanism again after doing the
> disconnection/closing procedure (i tried both abort(), close() and
> disconnectFromHost()) . What i am seeing is that after the syn,syn/ack,ack
> handshake no SSL Client Hello is ever sent from client to server and after
> debugging a while i found that the socket mode is still SslClientMode.
> What i gather is that the startClientEncryption() fails because of the
> wrong socket mode.

Can you post a small sample of your code?

Though I think I can see the problem. QSslSocket::setSocketDescriptor does not 
call d->init(), like connectToHost{,Encrypted} do.

Please report this as a bug. The fix looks simple, but it needs testing.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130927/cc052b8d/attachment.sig>


More information about the Interest mailing list