diff options
Diffstat (limited to 'src/network/ssl/qsslsocket_openssl.cpp')
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 650d37fdbb..23a63ed063 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -704,10 +704,9 @@ void QSslSocketBackendPrivate::transmit() // Write encrypted data from the buffer into the read BIO. int writtenToBio = q_BIO_write(readBio, data.constData(), encryptedBytesRead); - // do the actual read() here and throw away the results. + // Throw away the results. if (writtenToBio > 0) { - // ### TODO: make this cheaper by not making it memcpy. E.g. make it work with data=0x0 or make it work with seek - plainSocket->read(data.data(), writtenToBio); + plainSocket->skip(writtenToBio); } else { // ### Better error handling. setErrorAndEmit(QAbstractSocket::SslInternalError, @@ -1500,7 +1499,7 @@ bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device, } // Extract the data - EVP_PKEY *pkey; + EVP_PKEY *pkey = nullptr; X509 *x509; STACK_OF(X509) *ca = 0; |