diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2019-09-06 13:01:43 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2019-09-10 07:22:16 +0200 |
commit | e5e8f1d67ce5f74ccb345086667933266543fd51 (patch) | |
tree | 3a3cab2c9d59b1a7d8766e72635c68b4f07d39e0 /src/network | |
parent | 97b9af1519ad3809a7900f0ac1f5710a439c87c2 (diff) |
Schannel: handle SEC_E_INCOMPLETE_DATA in acceptContext
It's not a failure state, we just need more data. It is handled properly
in other functions.
Change-Id: I9450a78c71a3f4fe9506a7a79de6efa2db08697c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/ssl/qsslsocket_schannel.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/ssl/qsslsocket_schannel.cpp b/src/network/ssl/qsslsocket_schannel.cpp index 37705b03a1..339ecf4da2 100644 --- a/src/network/ssl/qsslsocket_schannel.cpp +++ b/src/network/ssl/qsslsocket_schannel.cpp @@ -828,12 +828,17 @@ bool QSslSocketBackendPrivate::acceptContext() &expiry // ptsTimeStamp ); + if (status == SEC_E_INCOMPLETE_MESSAGE) { + // Need more data + return true; + } + if (inBuffers[1].BufferType == SECBUFFER_EXTRA) { // https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel // inBuffers[1].cbBuffer indicates the amount of bytes _NOT_ processed, the rest need to // be stored. intermediateBuffer = intermediateBuffer.right(int(inBuffers[1].cbBuffer)); - } else if (status != SEC_E_INCOMPLETE_MESSAGE) { + } else { /* No 'extra' data, message not incomplete */ intermediateBuffer.clear(); } |