| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
| |
This will need to be updated each time the ntor keys change.
|
| |
|
|
|
|
|
|
|
|
| |
This trickles down to the tor-proto channel handshake code. But, the
real need is in the channel builder in order to validate the outbound
channel target.
Fixes #2440
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This object contains a melting pot of public keys, private keys and
certificates.
Rename it to reflect that it is channel authentication material and not
"identities.
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374454
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
This way we can unit tests properly.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Disable use-statements which are only needed for unix.
|
| | |
|
| |
|
|
| |
Will clean this up in the following commit.
|
| |
|
|
|
|
| |
No need to pass from the arti relay binary our addresses when handling
an incoming channel, use the one in the channel builder that an
initiator channel uses.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
This method was renamed previously.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
Move rotating keys into a function so we can use it in
try_generate_keys() that is used at startup.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This task crypto module has a rotate key task that is in charge of
rotating keys from our KeyMgr based on the valid until.
To do so, we add a RotatableKeySpec trait to help us specify our to
rotate a specific key. Allows us to have a generic rotate/generate
function for all our keys.
Task runs every 60 seconds. Taken from C-tor.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This requires the `TlsKeyAndCert` so be passed on the TLS acceptor
settings. We assume that `RelayIdentities` has this information.
The ChanBuilder::new() was getting a bit too convoluted and feature
gated to instead we introduce new_client() and new_relay() and remove
the need for `with_identities()`.
Because of this, the ChanMgr::new() now returns a `Result<>`.
Related to #1597
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
| |
This method won't really be used for bootstrapping anymore.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
We need the advertised addresses for the NETINFO cell when opening a
relay channel. Keep them in the TorRelay object so we can pass them to
the ChanMgr channel handler.
This will also help with config reload where only the local values in
TorRelay will need to be updated.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This struct is used to pass configuration parameters to the ChanMgr when
building it.
At the moment, it holds the ChannelConfig and RelayIdentities (feature
gated) which will be used in subsequent commits.
Note that relays do require RelayIdentities to build channels.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
We'll rely on a RelayIdentities to pass in the right keys to the ChanMgr
instead of the entire KeyMgr.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
I don't expect that we'll need this.
|
| | |
|
| |
|
|
|
| |
This does not yet get the OR port from the config, and the channel
manager doesn't yet do anything with the incoming connection.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
We don't want to create new files just when creating a `InertTorRelay`.
We should only generate the keys before bootstrapping.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have bootstrap() to prepare everything we need before starting the
relay which yields a TorRelay.
This commit then adds a run() function which starts the relay by
launching background task. At the moment, we only have one task and it
is the channel expiry one.
The relay blocks on the task handle set until one task is on error or
stops which leads to shutting down the relay.
Part of #2217
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
We decided to move away from the `Error` + `ErrorDetail`
all-encompassing enum design, and will use `anyhow::Error` in more
places. When we need to handle specific errors, we will create smaller
more-specific error types in those cases.
|
| | |
|
| |
|
|
| |
And remove one that we didn't need.
|
| | |
|
| | |
|