Karolin Varner
77760d71df
feat(API): Use mio::Token based polling
...
Avoid polling every single IO source to collect events,
poll those specific IO sources mio tells us about.
2024-08-19 00:31:01 +02:00
Karolin Varner
53e560191f
feat(API): Close API connections after error
2024-08-19 00:31:01 +02:00
Karolin Varner
594f894206
feat(API): AddPskBroker endpoint
2024-08-17 15:30:10 +02:00
Karolin Varner
a831e01a5c
chore: Utilities to check for unix domain stream sockets
2024-08-17 15:30:10 +02:00
Karolin Varner
24eebe29a1
feat(API): AddListenSocket endpoint
2024-08-16 14:37:42 +02:00
Karolin Varner
edf1e774c1
feat(API): SupplyKeypair endpoint
2024-08-16 11:13:34 +02:00
Karolin Varner
7a31b57227
chore(API): Infrastructure to use endpoints with fd. passing
2024-08-16 08:39:27 +02:00
Karolin Varner
48f7ff93e3
chore(API, AppServer): Deal with CryptoServer being uninit.
...
Before this, we would just raise an error.
2024-08-16 08:34:07 +02:00
Karolin Varner
7b3b7612cf
chore(api): API should have access to AppServer
...
The borrow checker does not approve, hence there are many shenanigans
with extension traits.
2024-08-16 08:34:07 +02:00
Karolin Varner
08653c3338
chore: clippy
2024-08-16 00:35:46 +02:00
Paul Spooren
1853e0a3c0
feat: add test case and check fd value
...
Signed-off-by: Paul Spooren <mail@aparcar.org >
2024-08-12 11:37:15 +02:00
Benjamin Lipp
245d4d1a0f
feat: add tests for util file.rs
...
Co-authored-by: Paul Spooren <mail@aparcar.org >
2024-08-12 11:37:15 +02:00
Katherine Watson
9fd3df67ed
chore: Fix typos and add various comments
2024-08-07 23:11:13 -07:00
Karolin Varner
6d47169a5c
feat: Set CLOEXEC flag on claimed fds and mask them
...
Masking the file descriptors (by replaying them with a file descriptor pointing towards /dev/null)
mitigates use after free (on file descriptor) attacks. In case some
piece of code still holds a reference to the file descriptor, that
file descriptor now merely holds a reference to /dev/null.
Otherwise, the file descriptor might be reused and the reference
could now mistakenly point to all sorts of – potentially more harmful – files, such as memfd_secret
file descriptors, storing our secret keys.
2024-08-05 16:16:09 +02:00
Karolin Varner
730a03957a
feat: A variety of utilities in preparation for implementing the API
2024-08-03 16:50:21 +02:00
Karolin Varner
ea071f5363
feat: Convenience functions and traits to automatically handle ErrorKind::{Interrupt, WouldBlock}
2024-08-03 16:49:02 +02:00
Karolin Varner
3063d3e4c2
feat: Convenience traits to get the ErrorKind of an io error for match clauses
2024-08-03 16:48:25 +02:00
Karolin Varner
1bf0eed90a
feat: Convenience function to just call a function
2024-08-03 16:46:48 +02:00
Karolin Varner
54ac5eecdb
chore: Warnings & clippy hints
2024-08-03 14:13:03 +02:00
Karolin Varner
6bbe85a57b
chore: Remove unnecessary imports
2024-08-03 13:59:55 +02:00
Prabhpreet Dua
c1abfbfd14
feat(rosenpass): Add wireguard-broker interface in AppServer ( #303 )
...
Dynamically dispatch WireguardBrokerMio trait in AppServer. Also allows for mio event registration and poll processing, logic from dev/broker-architecture branch
Co-authored-by: Prabhpreet Dua <615318+prabhpreet@users.noreply.github.com >
Co-authored-by: Karolin Varner <karo@cupdev.net >
2024-05-20 18:12:42 +05:30
Prabhpreet Dua
2bac991305
feat(wireguard-broker): merge from dev/broker-architecture, fixes, test
...
* wireguard-broker: merge from dev/broker-architecture
* use zerocopy instead of lenses
* Require use_broker feature flag to comile broker binaries
* Remove PhantomData from BrokerServer & BrokerClient
* Modify mio client rx to be non-recursive, add integration test
Co-authored-by: Karolin Varner <karo@cupdev.net >
Co-authored-by: Prabhpreet Dua <615318+prabhpreet@users.noreply.github.com >
2024-05-07 12:23:35 +05:30
Prabhpreet Dua
4bb3153761
feat(deps): Change base64 to base64ct crate ( #295 )
2024-05-06 21:14:10 +05:30
Emil Engler
39d174c605
util: Suppress clippy warnings for neutral element
2024-04-25 11:01:09 +02:00
Paul Spooren
40d955a156
proper permission for secrets aka 0o600
...
When creating secret keys or use the out file feature, the material
shouldn't be readble to everyone by default.
Fix : #260
Signed-off-by: Paul Spooren <mail@aparcar.org >
2024-03-20 14:24:23 +01:00
Karolin Varner
9690085156
chore: Cargo fmt
2024-01-27 21:38:13 +01:00
Karolin Varner
e42f90b048
chore: Add helper to turn typenums into const values
2024-01-27 21:38:13 +01:00
wucke13
62aa9b4351
fix: second round of clippy lints
...
Clippy would not automatically apply these fixes, so they were applied
by hand.
2024-01-03 18:43:05 +01:00
Karolin Varner
e3b72487db
fix: Make sure all tests are run during CI runs
...
Had to fix the tests in util/src/result.rs.
2024-01-03 18:43:05 +01:00
Karolin Varner
1eefb5f263
fix: Guaranteed results typo
2023-12-02 12:21:41 +01:00
Karolin Varner
101c9bf4b3
feat: Add an internal library for guaranteed results
...
This is helpful for functions that have to return a result to
implement some interface but that do not actually need to return
a result value.
2023-12-02 10:42:13 +01:00
Jemilu Mohammed
ca35e47d2a
manage features in workspaces cargo.toml file
2023-11-30 18:44:28 +01:00
Jemilu Mohammed
181154b470
move external dependencies to workspace level
2023-11-30 18:44:28 +01:00
Karolin Varner
86300ca936
chore: Use naming scheme without rosenpass- for crates
2023-11-26 10:38:24 +01:00