How to select an ALPN protocol when using QSslSocket (TLS)
-
I'd like to use QSslSocket to connect to an XMPP server by using direct TLS (no STARTTLS) and I'd like to select the correct ALPN protocol (
xmpp-client) if the server supports the ALPN TLS extension (and ideally abort the connection if ALPN is supported but the 'xmpp-client' protocol isn't offered).I only found
QSslConfiguration::setAllowedNextProtocols()(see https://doc.qt.io/qt-6/qsslconfiguration.html#setAllowedNextProtocols), but it seems like this is only used when I host a server (?).Thanks in advance!
-
I'd like to use QSslSocket to connect to an XMPP server by using direct TLS (no STARTTLS) and I'd like to select the correct ALPN protocol (
xmpp-client) if the server supports the ALPN TLS extension (and ideally abort the connection if ALPN is supported but the 'xmpp-client' protocol isn't offered).I only found
QSslConfiguration::setAllowedNextProtocols()(see https://doc.qt.io/qt-6/qsslconfiguration.html#setAllowedNextProtocols), but it seems like this is only used when I host a server (?).Thanks in advance!
@Linus-Jahn said in How to select an ALPN protocol when using QSslSocket (TLS):
but it seems like this is only used when I host a server (?).
This function sets the allowed protocols to be negotiated with the serverThis sentence implies something opposite?
-
Ahhh okay, sorry, yeah I read that as "if you host a server, these are the allowed protocols clients can negotiate with it".
-
L Linus Jahn has marked this topic as solved on