summaryrefslogtreecommitdiff
path: root/crates/tor-cell
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tor-cell')
-rw-r--r--crates/tor-cell/Cargo.toml5
-rw-r--r--crates/tor-cell/fuzz/Cargo.toml2
-rw-r--r--crates/tor-cell/src/relaycell.rs2
-rw-r--r--crates/tor-cell/src/relaycell/msg.rs24
-rw-r--r--crates/tor-cell/tests/testvec_relaymsg.rs8
5 files changed, 21 insertions, 20 deletions
diff --git a/crates/tor-cell/Cargo.toml b/crates/tor-cell/Cargo.toml
index d0db4f188..0d75633b4 100644
--- a/crates/tor-cell/Cargo.toml
+++ b/crates/tor-cell/Cargo.toml
@@ -14,10 +14,11 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
default = []
-experimental = ["experimental-udp", "onion-service"]
+experimental = ["experimental-udp", "hs"]
# Enable experimental UDP support.
experimental-udp = []
-onion-service = ["tor-hscrypto"] #TODO hs: rename this feature, it is not service-specific.
+# "hs" = (all) hidden service support, either client or server
+hs = ["tor-hscrypto"]
# Enable testing only API
testing = ["experimental-udp"]
diff --git a/crates/tor-cell/fuzz/Cargo.toml b/crates/tor-cell/fuzz/Cargo.toml
index 199783cf2..2ebffc7f8 100644
--- a/crates/tor-cell/fuzz/Cargo.toml
+++ b/crates/tor-cell/fuzz/Cargo.toml
@@ -15,7 +15,7 @@ libfuzzer-sys = "0.4"
[dependencies.tor-cell]
path = ".."
-features = ["onion-service", "experimental"]
+features = ["hs-service", "experimental"]
[dependencies.tor-bytes]
path = "../../tor-bytes"
diff --git a/crates/tor-cell/src/relaycell.rs b/crates/tor-cell/src/relaycell.rs
index d93e8bdf3..5c8859d3c 100644
--- a/crates/tor-cell/src/relaycell.rs
+++ b/crates/tor-cell/src/relaycell.rs
@@ -10,7 +10,7 @@ use caret::caret_int;
use rand::{CryptoRng, Rng};
pub mod extend;
-#[cfg(feature = "onion-service")]
+#[cfg(feature = "hs-service")]
pub mod hs;
pub mod msg;
pub mod restrict;
diff --git a/crates/tor-cell/src/relaycell/msg.rs b/crates/tor-cell/src/relaycell/msg.rs
index 1ba5c77ad..92c64c4bf 100644
--- a/crates/tor-cell/src/relaycell/msg.rs
+++ b/crates/tor-cell/src/relaycell/msg.rs
@@ -17,8 +17,8 @@ use tor_llcrypto::pk::rsa::RsaIdentity;
use bitflags::bitflags;
-#[cfg(feature = "onion-service")]
-#[cfg_attr(docsrs, doc(cfg(feature = "onion-service")))]
+#[cfg(feature = "hs-service")]
+#[cfg_attr(docsrs, doc(cfg(feature = "hs-service")))]
pub use super::hs::{
est_intro::EstablishIntro, EstablishRendezvous, IntroEstablished, Introduce1, Introduce2,
IntroduceAck, Rendezvous1, Rendezvous2, RendezvousEstablished,
@@ -73,31 +73,31 @@ pub enum AnyRelayMsg : RelayMsg {
[feature = "experimental-udp"]
Datagram,
/// Establish Introduction
- [feature = "onion-service"]
+ [feature = "hs-service"]
EstablishIntro,
/// Establish Rendezvous
- [feature = "onion-service"]
+ [feature = "hs-service"]
EstablishRendezvous,
/// Introduce1 (client to introduction point)
- [feature = "onion-service"]
+ [feature = "hs-service"]
Introduce1,
/// Introduce2 (introduction point to service)
- [feature = "onion-service"]
+ [feature = "hs-service"]
Introduce2,
/// Rendezvous1 (service to rendezvous point)
- [feature = "onion-service"]
+ [feature = "hs-service"]
Rendezvous1,
/// Rendezvous2 (rendezvous point to client)
- [feature = "onion-service"]
+ [feature = "hs-service"]
Rendezvous2,
/// Acknowledgement for EstablishIntro.
- [feature = "onion-service"]
+ [feature = "hs-service"]
IntroEstablished,
/// Acknowledgment for EstablishRendezvous.
- [feature = "onion-service"]
+ [feature = "hs-service"]
RendezvousEstablished,
/// Acknowledgement for Introduce1.
- [feature = "onion-service"]
+ [feature = "hs-service"]
IntroduceAck,
_ =>
@@ -1213,7 +1213,7 @@ msg_impl_relaymsg!(
#[cfg(feature = "experimental-udp")]
msg_impl_relaymsg!(ConnectUdp, ConnectedUdp, Datagram);
-#[cfg(feature = "onion-service")]
+#[cfg(feature = "hs-service")]
msg_impl_relaymsg!(
EstablishIntro,
EstablishRendezvous,
diff --git a/crates/tor-cell/tests/testvec_relaymsg.rs b/crates/tor-cell/tests/testvec_relaymsg.rs
index 02bbe4101..54077745e 100644
--- a/crates/tor-cell/tests/testvec_relaymsg.rs
+++ b/crates/tor-cell/tests/testvec_relaymsg.rs
@@ -14,7 +14,7 @@ use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use hex_literal::hex;
-#[cfg(feature = "onion-service")]
+#[cfg(feature = "hs-service")]
use tor_cell::relaycell::hs;
#[cfg(feature = "experimental-udp")]
use tor_cell::relaycell::udp;
@@ -619,7 +619,7 @@ fn test_connected_udp() {
);
}
-#[cfg(feature = "onion-service")]
+#[cfg(feature = "hs-service")]
#[test]
fn test_establish_rendezvous() {
let cmd = RelayCmd::ESTABLISH_RENDEZVOUS;
@@ -655,7 +655,7 @@ fn test_establish_rendezvous() {
);
}
-#[cfg(feature = "onion-service")]
+#[cfg(feature = "hs-service")]
#[test]
fn test_establish_intro() {
use tor_cell::relaycell::hs::{est_intro::*, AuthKeyType, UnrecognizedExt};
@@ -714,7 +714,7 @@ fn test_establish_intro() {
);
}
-#[cfg(feature = "onion-service")]
+#[cfg(feature = "hs-service")]
#[test]
fn test_introduce() {
use tor_cell::relaycell::{