onyinyang
5f34f49d17
Formatting changes from cargo fmt
2024-04-16 16:05:49 -04:00
Cecylia Bocovich
c92a14d612
Use more descriptive error for lox proto functions
...
Request functions for protocols in the Lox library previously returned a
ProofError error type, which is not verbose enough to allow for accurate
debugging.
This commit introduces a new error enum, CredentialError, with several
types that allow for descriptive error messages.
2024-03-12 16:16:04 -04:00
Cecylia Bocovich
12deeddeb0
Further condense search for replacement spares
2024-03-09 20:55:40 -05:00
Cecylia Bocovich
762fef432f
Remove unecessary res variable
2024-03-09 20:55:40 -05:00
Cecylia Bocovich
a6c98b8f43
De-duplicate bridge replacement code
2024-03-09 20:55:40 -05:00
Cecylia Bocovich
e6b0cf842a
Pass available_bridge by value rather than reference
...
Allows us to pop() from extra_bridges, which is less prone to errors than
calling both last() and then remove().
2024-03-09 20:55:40 -05:00
Cecylia Bocovich
2c396f63fa
Factor out a dissolve_spare_bucket fn
...
This function takes a spare bucket, specified by the given key, and
repurposes the bridges as unallocated.
2024-03-09 20:15:03 -05:00
Cecylia Bocovich
41402209f5
Delay recycling bridge table keys until we're done with them
2024-03-09 20:14:34 -05:00
Cecylia Bocovich
6462027b7f
Simplify selection of spare replacement bucket
2024-03-09 20:14:29 -05:00
Cecylia Bocovich
203b949d43
Use let-else to return early and reduce indentation
2024-03-09 16:25:41 -05:00
onyinyang
420d3be4bd
Fixes last open invite bucket distribution
2024-02-12 23:11:55 +00:00
onyinyang
33e24ef5b6
Fix bug in bridge_replace fn, test
2024-01-18 03:34:22 +00:00
onyinyang
6afc557ad5
Fix length of bridge bytes and rdsys request interval
2024-01-17 16:43:39 +00:00
onyinyang
075d51b088
Add better serde error handling to wasm functions
2023-12-21 17:00:49 +00:00
Cecylia Bocovich
39449cabe8
Respond with error when open invitation buckets are empty
...
Expand the error type returns by invite() to include a new error for
when there are no available bridges for open invitation users. This
fixes a bug that previously caused a panic when we have no bridges to
distribute.
See https://gitlab.torproject.org/tpo/anti-censorship/lox/-/issues/43
2023-12-20 13:52:42 -05:00
onyinyang
c8b6bb9fdd
Formatting and clippy changes
2023-12-19 20:02:12 +00:00
onyinyang
472445a9a5
Add README for rdsys-backend-api, lox-utils and switch to lox-zkp crate
2023-11-23 11:44:05 -05:00
onyinyang
fdde186c92
Add lox-wasm and lox-utils READMEs and other fmt fixes
2023-11-21 12:57:00 -05:00
onyinyang
66f560eb08
Remove unneeded fields from bridgeline and reduce BRIDGE_BYTES
2023-11-14 17:30:45 +00:00
onyinyang
cb159405a3
Add watched_blockages to config file and improve naming
2023-11-14 17:30:45 +00:00
onyinyang
e356034dae
Fixup and add comments, README to Lox Library
2023-11-07 18:44:25 -05:00
onyinyang
ba70b1b4d4
Add a MAX_DAILY_BRIDGES to limit invites per day
2023-10-30 15:17:08 -04:00
onyinyang
96a03f1a27
Remove non-implicit invremain attribute fields
2023-10-23 17:11:15 -04:00
onyinyang
ed72b05347
Add changes for bug fix in zkp crate
2023-10-23 15:22:11 -04:00
onyinyang
794f80ab11
Fix bug in DupFilter that breaks serialize/deserialize
2023-10-23 13:55:19 -04:00
onyinyang
68b5a9c18e
Upgrading several dalek dependencies and rand
2023-10-19 10:58:09 -04:00
onyinyang
4f7b96a603
Fix up some minor issues + fix bug in context sync
2023-10-18 12:09:46 -04:00
onyinyang
89fb0fbf4b
Add handling for unaccounted for bridges
2023-10-18 12:08:15 -04:00
onyinyang
25add69c4d
Add syncing functionality
2023-10-18 12:08:15 -04:00
onyinyang
be0d026fe8
Cleanup and add syncing of resources
2023-10-18 12:08:15 -04:00
onyinyang
7cc133236c
Add additional required changes for crate aes-gcm update to 0.1.0
2023-09-19 13:43:59 +00:00
onyinyang
f85878c89a
Change base64 generator to match updates
2023-09-14 15:30:10 +00:00
onyinyang
7647564c1e
Add test for k-invites
2023-08-02 17:21:03 -04:00
onyinyang
faf40caf3a
Change open invite logic to distribute to k users
2023-08-02 10:34:39 -04:00
onyinyang
35f62ed213
Cleanup
2023-08-02 10:20:40 -04:00
onyinyang
572928a271
Fixed Basic Serialization/Deserialization to json
2023-08-02 10:15:11 -04:00
onyinyang
f52c6f515a
Add EXPIRY_DATE constant and fixup cloned vectors
2023-08-02 10:11:47 -04:00
onyinyang
93ce3e41b7
Add ExhausedIndexError for no available bucket ids
2023-08-02 10:11:46 -04:00
onyinyang
471cb8c8c4
Add test for find_next_available_key
2023-08-02 10:11:46 -04:00
onyinyang
6191970d9a
Fixed clean up blocked test
2023-08-02 10:11:46 -04:00
onyinyang
9c2b7703a8
Added open inv cleanup test
2023-08-02 10:11:46 -04:00
onyinyang
a62b537aa6
Add testing for blocked bucket cleanup
2023-08-02 10:11:46 -04:00
onyinyang
3c88f4471b
Fix up convoluted function
2023-08-02 10:11:46 -04:00
onyinyang
d2d09bccc1
Add more comprehensive logic for tidying unneeded buckets
2023-08-02 10:11:46 -04:00
onyinyang
40f1e88a31
Add find_next_available_key function to prevent overwriting buckets
2023-08-02 10:11:46 -04:00
onyinyang
d98ae40879
Fix formatting
2023-07-19 10:30:35 -04:00
onyinyang
607466b949
Clean up clippy fixes
2023-06-23 13:04:15 -04:00
onyinyang
369d830bca
All tests passing for HashMap implementation
2023-06-23 08:30:14 -04:00
onyinyang
69e4579450
Change encbuckets to HashMap with EncryptedBucket
2023-06-23 08:30:14 -04:00
onyinyang
610a579731
Fix up bridge_unreachable
2023-06-23 08:24:28 -04:00