Deprecate TLS rehandshake APIs

Allowing unsafe rehandshakes used to be required for web compatibility,
but this is no longer a concern in 2018. So there should no longer be
compatibility benefits to calling this function. All it does is make
your TLS connection insecure.

Also, rehandshaking no longer exists at all in TLS 1.3.

At some point (maybe soon!) glib-networking will begin ignoring the
rehandshake mode, so let's deprecate it now.
This commit is contained in:
Michael Catanzaro
2018-11-20 22:04:56 -06:00
parent 2031e37dfc
commit 85f7d493d7
5 changed files with 28 additions and 6 deletions

View File

@@ -194,7 +194,8 @@ g_tls_connection_class_init (GTlsConnectionClass *klass)
G_TLS_REHANDSHAKE_SAFELY,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
G_PARAM_STATIC_STRINGS |
G_PARAM_DEPRECATED));
/**
* GTlsConnection:certificate:
*
@@ -697,6 +698,10 @@ g_tls_connection_get_require_close_notify (GTlsConnection *conn)
* software.
*
* Since: 2.28
*
* Deprecated: 2.60. Changing the rehandshake mode is no longer
* required for compatibility. Also, rehandshaking has been removed
* from the TLS protocol in TLS 1.3.
*/
void
g_tls_connection_set_rehandshake_mode (GTlsConnection *conn,
@@ -719,6 +724,10 @@ g_tls_connection_set_rehandshake_mode (GTlsConnection *conn,
* Returns: @conn's rehandshaking mode
*
* Since: 2.28
*
* Deprecated: 2.60. Changing the rehandshake mode is no longer
* required for compatibility. Also, rehandshaking has been removed
* from the TLS protocol in TLS 1.3.
*/
GTlsRehandshakeMode
g_tls_connection_get_rehandshake_mode (GTlsConnection *conn)