From 182d705960909aec584ee60ff7d5b093ef30d8e5 Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 21 Nov 2024 22:21:43 +0200 Subject: [PATCH] update comments --- src/app/browser/window/tab/item/page.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/browser/window/tab/item/page.rs b/src/app/browser/window/tab/item/page.rs index f42e6ff6..7b5e9550 100644 --- a/src/app/browser/window/tab/item/page.rs +++ b/src/app/browser/window/tab/item/page.rs @@ -435,7 +435,11 @@ impl Page { let tls_connection = TlsClientConnection::new(&connection, Some(&connectable)).unwrap(); // @TODO handle tls_connection.set_certificate(&certificate); - tls_connection.connect_accept_certificate(move |_, _, _| true); // @TODO manual validation + + // @TODO manual validation + // https://geminiprotocol.net/docs/protocol-specification.gmi#tls-server-certificate-validation + tls_connection.connect_accept_certificate(move |_, _, _| true); + tls_connection.upcast::() } else { connection.upcast::() @@ -487,14 +491,13 @@ impl Page { SocketClientEvent::ProxyNegotiating => Status::ProxyNegotiating, SocketClientEvent::ProxyNegotiated => Status::ProxyNegotiated, SocketClientEvent::TlsHandshaking => { - // Handle certificate errors here + // Handle certificate errors @TODO + // https://geminiprotocol.net/docs/protocol-specification.gmi#tls-server-certificate-validation stream .unwrap() .dynamic_cast_ref::() .unwrap() - .connect_accept_certificate(|_, _, _| { - true // @TODO - }); + .connect_accept_certificate(|_, _, _| true); Status::TlsHandshaking } SocketClientEvent::TlsHandshaked => Status::TlsHandshaked,