Skip to content

Commit

Permalink
gosling: update calls to TorProvider::connect()
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Pospesel committed May 26, 2024
1 parent d98edef commit 6a9728d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fuzz_target!(|data: HandshakeData| {
bob_tor.add_client_auth(&alice_endpoint_onion_service_id, &bob_private_x25519).unwrap();

// bob connects to alice
let mut bob_stream = bob_tor.connect(&alice_endpoint_onion_service_id, 420, None).unwrap();
let mut bob_stream = bob_tor.connect((alice_endpoint_onion_service_id.clone(), 420).into(), None).unwrap();
bob_stream.set_nonblocking(false).unwrap();
bob_stream.set_read_timeout(Some(Duration::from_millis(100u64))).unwrap();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fuzz_target!(|data: HandshakeData| {
let bob_onion_service_id_string = bob_onion_service_id.to_string();

// bob connects to alice
let mut bob_stream = bob_tor.connect(&alice_onion_service_id, 420, None).unwrap();
let mut bob_stream = bob_tor.connect((alice_onion_service_id.clone(), 420).into(), None).unwrap();
bob_stream.set_nonblocking(false).unwrap();
bob_stream.set_read_timeout(Some(Duration::from_millis(100u64))).unwrap();

Expand Down
4 changes: 2 additions & 2 deletions source/gosling/crates/gosling/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl Context {
// open tcp stream to remove ident server
let stream: TcpStream = self
.tor_provider
.connect(&identity_server_id, self.identity_port, None)?
.connect((identity_server_id.clone(), self.identity_port).into(), None)?
.into();
stream.set_nonblocking(true)?;
let mut client_rpc = Session::new(stream);
Expand Down Expand Up @@ -427,7 +427,7 @@ impl Context {
.add_client_auth(&endpoint_server_id, &client_auth_key)?;
let stream: TcpStream = self
.tor_provider
.connect(&endpoint_server_id, self.endpoint_port, None)?
.connect((endpoint_server_id.clone(), self.endpoint_port).into(), None)?
.into();
stream.set_nonblocking(true)?;

Expand Down

0 comments on commit 6a9728d

Please sign in to comment.