Improving TLS handshake support: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Update=
[[Category:Developing Qt::Network]]<br />[[Category:Developing Qt::Bugs]]
 
[toc align_right=&quot;yes&amp;quot; depth=&quot;3&amp;quot;]
 
= Update =


Code submitted for review: https://codereview.qt.io/#q,54364,n,z
Code submitted for review: https://codereview.qt.io/#q,54364,n,z


The <span class="caps">API</span>s are all generic supporting send and receive of custom <span class="caps">TLS</span> extension data and supplemental data.
The APIs are all generic - supporting send and receive of custom TLS extension data and supplemental data.


Please note, the add* methods on QSslSocket must be called from the slot registered direct with the associated signals (call setTLSAuthClientExtension from the slot connected to the readyForTLSAuthClientExtension signal, for example).
Please note, the add* methods on QSslSocket must be called from the slot registered direct with the associated signals (call setTLSAuthClientExtension from the slot connected to the readyForTLSAuthClientExtension signal, for example).


The review includes code providing a simple demo application available from qtbase/examples/network/tlsauthextensions, which leverages the generic <span class="caps">TLS</span> extension and supplemental data features to support <span class="caps">RFC</span> 5878 (<span class="caps">TLS</span> auth extensions)
The review includes code providing a simple demo application - available from qtbase/examples/network/tlsauthextensions, which leverages the generic TLS extension and supplemental data features to support RFC 5878 (TLS auth extensions)


The review also includes autotests added to the ssl socket suite: tlsAuth and tlsAuthWithError
The review also includes autotests added to the ssl socket suite: tlsAuth and tlsAuthWithError


=Remaining outstanding work=
= Remaining outstanding work =


The <span class="caps">TLS</span> extension <span class="caps">API</span>s and signals need to be accessible to applications using QWebView, which leverages a pool of QSslSockets and does not expose the sockets directly, as requests may be served from any of the sockets in the pool.
The TLS extension APIs and signals need to be accessible to applications using QWebView, which leverages a pool of QSslSockets and does not expose the sockets directly, as requests may be served from any of the sockets in the pool.


'''Question''': Should <span class="caps">API</span>s be exposed on QNetworkAccessManager and plumbed through to QSslSocket (this would bloat the <span class="caps">QNAM</span> <span class="caps">API</span> significantly), or should this logic be moved to somewhere more <span class="caps">SSL</span>-specific? (something new? QSslConfiguration?)
'''Question''': Should APIs be exposed on QNetworkAccessManager and plumbed through to QSslSocket (this would bloat the QNAM API significantly), or should this logic be moved to somewhere more SSL-specific? (something new? QSslConfiguration?)


=Improving Qt’s <span class="caps">TLS</span> Handshake Support=
= Improving Qt's TLS Handshake Support =


Work is starting on support for <span class="caps">TLS</span> extensions (http://www.ietf.org/rfc/rfc5246.txt) as well as support for the supplemental data handshake message (http://tools.ietf.org/html/rfc4680). This page is intended to be used to work through implementation issues and <span class="caps">API</span> design considerations.
Work is starting on support for TLS extensions (http://www.ietf.org/rfc/rfc5246.txt) as well as support for the supplemental data handshake message (http://tools.ietf.org/html/rfc4680). This page is intended to be used to work through implementation issues and API design considerations.


Support for double handshake/renegotiation may also be considered here, as it is common to use the double handshake technique to require the initial supplemental data sent by the server to be sent encrypted.
Support for double handshake/renegotiation may also be considered here, as it is common to use the double handshake technique to require the initial supplemental data sent by the server to be sent encrypted.
Line 27: Line 31:
Bugs filed:
Bugs filed:


* <span class="caps">TLS</span> extensions: https://bugreports.qt.io/browse/QTBUG-30095
* TLS extensions: https://bugreports.qt.io/browse/QTBUG-30095
* Supplemental data: https://bugreports.qt.io/browse/QTBUG-30093
* Supplemental data: https://bugreports.qt.io/browse/QTBUG-30093
* <span class="caps">SSL</span> renegotiation: https://bugreports.qt.io/browse/QTBUG-30182
===Categories:===
* [[:Category:Developing-Qt|Developing Qt]]
** [[:Category:Developing-Qt::Bugs|Bugs]]
* [[:Category:Developing-Qt::Network|Network]]

Revision as of 11:20, 24 February 2015


[toc align_right="yes&quot; depth="3&quot;]

Update

Code submitted for review: https://codereview.qt.io/#q,54364,n,z

The APIs are all generic - supporting send and receive of custom TLS extension data and supplemental data.

Please note, the add* methods on QSslSocket must be called from the slot registered direct with the associated signals (call setTLSAuthClientExtension from the slot connected to the readyForTLSAuthClientExtension signal, for example).

The review includes code providing a simple demo application - available from qtbase/examples/network/tlsauthextensions, which leverages the generic TLS extension and supplemental data features to support RFC 5878 (TLS auth extensions)

The review also includes autotests added to the ssl socket suite: tlsAuth and tlsAuthWithError

Remaining outstanding work

The TLS extension APIs and signals need to be accessible to applications using QWebView, which leverages a pool of QSslSockets and does not expose the sockets directly, as requests may be served from any of the sockets in the pool.

Question: Should APIs be exposed on QNetworkAccessManager and plumbed through to QSslSocket (this would bloat the QNAM API significantly), or should this logic be moved to somewhere more SSL-specific? (something new? QSslConfiguration?)

Improving Qt's TLS Handshake Support

Work is starting on support for TLS extensions (http://www.ietf.org/rfc/rfc5246.txt) as well as support for the supplemental data handshake message (http://tools.ietf.org/html/rfc4680). This page is intended to be used to work through implementation issues and API design considerations.

Support for double handshake/renegotiation may also be considered here, as it is common to use the double handshake technique to require the initial supplemental data sent by the server to be sent encrypted.

A bug was found in the client-side support for renegotiation. A patch was submitted:
https://codereview.qt.io/#change,61661

Bugs filed: