[Qt-interest] QSslSocket server not working.

Jason H scorp1us at yahoo.com
Sun Nov 29 21:00:37 CET 2009


Hi, this is a major issue for me and I am in a crunch.

I cannot get a Qt SSL socket server working.I have subclassed QTcpServer and overridden incommingConnection() and called startServerEncyption, but this does not work.

For the server, I setLocalCertificate() and setPrivateKey(), and I verified these with:
>openssl s_server -cert publicKey.pem -key privateKey.pem -www

Then connecting to it via browser, and the OpenSSL server works. I also connected to it fine with openssl's s_client.

But nothing can negotiate with my Qt SSL server. My Server says:
incomingConnection()
startServerEncryption()
disconnected()
Encryptoon Failed
exited incomingConnection()

I also tried connecting to it with the same command to s_client as I was using before. Here's waht s_client gave me:
C:\OpenSSL\bin>openssl s_client -connect 127.0.0.1:7072 -tls1 -state -status -msg -debug
Loading 'screen' into random state - done
CONNECTED(00000778)
SSL_connect:before/connect initialization
write to 0xa4f8f8 [0xa59c00] (103 bytes => 103 (0x67))
0000 - 16 03 01 00 62 01 00 00-5e 03 01 4b 12 d0 d9 bc   ....b...^..K....
0010 - 36 3c 7b d6 8f f4 d8 3b-97 5b 6b b2 3b 0b 74 e4   6<{....;.[k.;.t.
0020 - a4 b3 89 91 55 b8 01 a4-5f 4e bb 00 00 28 00 39   ....U..._N...(.9
0030 - 00 38 00 35 00 16 00 13-00 0a 00 33 00 32 00 2f   .8.5.......3.2./
0040 - 00 07 00 05 00 04 00 15-00 12 00 09 00 14 00 11   ................
0050 - 00 08 00 06 00 03 01 00-00 0d 00 23 00 00 00 05   ...........#....
0060 - 00 05 01                                          ...
0067 - <SPACES/NULS>
>>> TLS 1.0 Handshake [length 0062], ClientHello
    01 00 00 5e 03 01 4b 12 d0 d9 bc 36 3c 7b d6 8f
    f4 d8 3b 97 5b 6b b2 3b 0b 74 e4 a4 b3 89 91 55
    b8 01 a4 5f 4e bb 00 00 28 00 39 00 38 00 35 00
    16 00 13 00 0a 00 33 00 32 00 2f 00 07 00 05 00
    04 00 15 00 12 00 09 00 14 00 11 00 08 00 06 00
    03 01 00 00 0d 00 23 00 00 00 05 00 05 01 00 00
    00 00
SSL_connect:SSLv3 write client hello A
read from 0xa4f8f8 [0xa553f0] (5 bytes => 0 (0x0))
SSL_connect:failed in SSLv3 read server hello A
2536:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:.\ssl\s3_pkt.c:530:


The best I can tell is startServerEncryption() just calls diconnectFromHost(), which I know can't be true!


      




More information about the Qt-interest-old mailing list