mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
disable TlsClientConnection close to prevent rehandshake failure on user certificate change in runtime
This commit is contained in:
parent
fbfd7a2c67
commit
79f219ba76
1 changed files with 3 additions and 2 deletions
|
|
@ -53,15 +53,16 @@ impl Connection {
|
||||||
/// Close owned [SocketConnection](https://docs.gtk.org/gio/class.SocketConnection.html)
|
/// Close owned [SocketConnection](https://docs.gtk.org/gio/class.SocketConnection.html)
|
||||||
/// and [TlsClientConnection](https://docs.gtk.org/gio/iface.TlsClientConnection.html) if active
|
/// and [TlsClientConnection](https://docs.gtk.org/gio/iface.TlsClientConnection.html) if active
|
||||||
pub fn close(&self) -> Result<(), Error> {
|
pub fn close(&self) -> Result<(), Error> {
|
||||||
|
/* Do not close `TlsClientConnection` as wanted for re-handshake
|
||||||
|
on user certificate change in runtime! @TODO
|
||||||
if let Some(ref tls_client_connection) = self.tls_client_connection {
|
if let Some(ref tls_client_connection) = self.tls_client_connection {
|
||||||
if !tls_client_connection.is_closed() {
|
if !tls_client_connection.is_closed() {
|
||||||
if let Err(e) = tls_client_connection.close(self.cancellable.as_ref()) {
|
if let Err(e) = tls_client_connection.close(self.cancellable.as_ref()) {
|
||||||
return Err(Error::TlsClientConnection(e));
|
return Err(Error::TlsClientConnection(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
if !self.socket_connection.is_closed() {
|
if !self.socket_connection.is_closed() {
|
||||||
// @TODO duplicated condition?
|
|
||||||
if let Err(e) = self.socket_connection.close(self.cancellable.as_ref()) {
|
if let Err(e) = self.socket_connection.close(self.cancellable.as_ref()) {
|
||||||
return Err(Error::SocketConnection(e));
|
return Err(Error::SocketConnection(e));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue