mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
update comments
This commit is contained in:
parent
e1b2a2b3d2
commit
182d705960
@ -435,7 +435,11 @@ impl Page {
|
|||||||
let tls_connection =
|
let tls_connection =
|
||||||
TlsClientConnection::new(&connection, Some(&connectable)).unwrap(); // @TODO handle
|
TlsClientConnection::new(&connection, Some(&connectable)).unwrap(); // @TODO handle
|
||||||
tls_connection.set_certificate(&certificate);
|
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::<IOStream>()
|
tls_connection.upcast::<IOStream>()
|
||||||
} else {
|
} else {
|
||||||
connection.upcast::<IOStream>()
|
connection.upcast::<IOStream>()
|
||||||
@ -487,14 +491,13 @@ impl Page {
|
|||||||
SocketClientEvent::ProxyNegotiating => Status::ProxyNegotiating,
|
SocketClientEvent::ProxyNegotiating => Status::ProxyNegotiating,
|
||||||
SocketClientEvent::ProxyNegotiated => Status::ProxyNegotiated,
|
SocketClientEvent::ProxyNegotiated => Status::ProxyNegotiated,
|
||||||
SocketClientEvent::TlsHandshaking => {
|
SocketClientEvent::TlsHandshaking => {
|
||||||
// Handle certificate errors here
|
// Handle certificate errors @TODO
|
||||||
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#tls-server-certificate-validation
|
||||||
stream
|
stream
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.dynamic_cast_ref::<TlsClientConnection>()
|
.dynamic_cast_ref::<TlsClientConnection>()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.connect_accept_certificate(|_, _, _| {
|
.connect_accept_certificate(|_, _, _| true);
|
||||||
true // @TODO
|
|
||||||
});
|
|
||||||
Status::TlsHandshaking
|
Status::TlsHandshaking
|
||||||
}
|
}
|
||||||
SocketClientEvent::TlsHandshaked => Status::TlsHandshaked,
|
SocketClientEvent::TlsHandshaked => Status::TlsHandshaked,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user