diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2018-12-13 15:39:26 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2019-06-12 22:59:14 +0200 |
commit | d8efc8d718e3b3a0464f321e740541f5b221a5d6 (patch) | |
tree | 61e4b038291b990871c01f1747408b2311030e9e /src/network/ssl/qsslsocket_openssl11_symbols_p.h | |
parent | 515c6e7639a7df647cfcc8b639e258864aaaa4af (diff) |
QSslSocket: add and set the TLSv1.3-specific PSK callbackv5.12.4
If this callback is not set then OpenSSL will call the callback
used for <= TLS 1.2 unconditionally when connecting. If using PSK it
will call it again later once the preshared key is needed.
We don't currently handle the TLSv1.3 PSK, but we definitely should.
But for now we can work around it - when psk_use_session_callback is
called we simply change the PSK callback to a dummy function whose only
purpose is to restore the old callback.
This is mostly done to keep behavior the same as it is now for users
(and to keep our tests running).
Later we can add a new signal and handle this new feature properly.
Task-number: QTBUG-67463
Change-Id: I4aca4ae73ec4be7c4f82a85e8864de103f35a834
Reviewed-by: Simo Fält <simo.falt@qt.io>
Diffstat (limited to 'src/network/ssl/qsslsocket_openssl11_symbols_p.h')
-rw-r--r-- | src/network/ssl/qsslsocket_openssl11_symbols_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket_openssl11_symbols_p.h b/src/network/ssl/qsslsocket_openssl11_symbols_p.h index fae007e12d..ec7e7ea1b8 100644 --- a/src/network/ssl/qsslsocket_openssl11_symbols_p.h +++ b/src/network/ssl/qsslsocket_openssl11_symbols_p.h @@ -178,4 +178,10 @@ void q_BIO_set_shutdown(BIO *a, int shut); #define q_SSL_CTX_set_max_proto_version(ctx, version) \ q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, nullptr) +extern "C" { +typedef int (*q_SSL_psk_use_session_cb_func_t)(SSL *, const EVP_MD *, const unsigned char **, size_t *, + SSL_SESSION **); +} +void q_SSL_set_psk_use_session_callback(SSL *s, q_SSL_psk_use_session_cb_func_t); + #endif |