Gio.TlsConnection.prototype.set_rehandshake_mode
function set_rehandshake_mode(mode: Gio.TlsRehandshakeMode): void {
// Gjs wrapper for g_tls_connection_set_rehandshake_mode()
}
Sets how conn behaves with respect to rehandshaking requests.
Gio.TlsRehandshakeMode.never means that it will never agree to rehandshake after the initial handshake is complete. (For a client, this means it will refuse rehandshake requests from the server, and for a server, this means it will close the connection with an error if the client attempts to rehandshake.)
Gio.TlsRehandshakeMode.safely means that the connection will allow a rehandshake only if the other end of the connection supports the TLS `renegotiation_info` extension. This is the default behavior, but means that rehandshaking will not work against older implementations that do not support that extension.
Gio.TlsRehandshakeMode.unsafely means that the connection will allow rehandshaking even without the `renegotiation_info` extension. On the server side in particular, this is not recommended, since it leaves the server open to certain attacks. However, this mode is necessary if you need to allow renegotiation with older client software.
Since 2.28
- mode
the rehandshaking mode