Commit Graph

88 Commits (17a9e510c57f3e141845a3eb7ef2774fd2eea3a3)

Author SHA1 Message Date
Morgan Pretty 17a9e510c5 Further work on unit tests (and a couple of bug fixes found when testing)
Removed a couple remaining TODOs
Added 'standardUserDefaults' to the 'Dependencies' type
Tweaked the OpenGroupAPI to only update the 'lastOpen' timestamp if it successfully polls
Refactored a couple of methods in the ConversationViewItem into swift so we can clean up the OpenGroupAPI more
Updated the OpenGroupAPI so it no longer has static variables for state (shifted to the OpenGroupManager and made them instance variables)
Fixed an encoding issue with the Capabilities.Capability
3 years ago
Morgan Pretty 81f563229f Renamed FileServerAPIV2 to FileServerAPI
Updated the direct file upload/download to use the non-base64 approaches as well
Updated the attachment 'serverId' value to be a string instead of a UInt64 (future-proofing)
Updated the OnionRequest V4 response handling to avoid converting the "response body" part to a string and processing that, instead just slice the byte array (ie. stopped it from being broken from multiple conversions)
Removed the base64-based file upload/download endpoints (no use including them when they are inefficient and we don't want to use them)
3 years ago
Morgan Pretty 1c474955de File upload working, further code cleanup
Got the updated file upload working
Removed the legacy 'room' header
Consolidated a number of types between SOGS, FileServer and general requests
Updated the OnionRequestAPI to deal with a Data payload (rather than encoding it to a string and then back to data)
3 years ago
Morgan Pretty 6936f35f2a Fixed a few issues uncovered while testing and some cleanup
Fixed an incorrect optional in RoomPollInfo
Fixed an incorrect parameter name in the ClosedGroupRequestBody
Fixed a crash due to a change in the ContactUtilities
Cleaned up the duplicate code in the OnionRequestAPI, HTTP and SnodeAPI to all use 'Data' response types
Updated the SnodeAPI to casting types to Any (made it hard to catch breaking changes with HTTP and OnionRequestAPI)
3 years ago
Morgan Pretty cc2a077a6c Started working on `MessageRequestResponse` handling for SOGS message requests
Pointing Curve25519 to use a fork that exposes an XEd25519 conversion method
Fixed an issue where I had broken all message sending due to the SnodeAPI casting Onion responses to `Any`
3 years ago
Morgan Pretty ef09d4d5aa Additional encryption work on id blinding
Got the updated blinding logic working (at least when authenticating a request - still need to deal with message signing and verification)
Storing the server capabilities in the database now so we can correctly blind requests based on them
Renamed the remaining 'v2' functions and classes to just be 'OpenGroup' since there isn't a 'V2' anymore
Cleaned up a few TODOs and functions
3 years ago
Morgan Pretty eb927c36a9 Started cleaning up some of the SOGS and Onion Requests structure
Cleaned up the OnionRequestAPI so we don't need the LegacyOnionRequestAPI
Added requests for the user endpoints
Added deprecated flags to the legacy endpoints and functions
Added some logic to start handling the new poll (batch) response
Started adding unit tests for the OpenGroupAPI functions
3 years ago
Morgan Pretty c90f346d6a Further SOGS V4 integration work
Added in the v4 onion requests logic
Added in the new pin/unpin APIs
Split up additional legacy methods to try and simplify the refactoring
Added a number of TODOs around usage of legacy request methods
3 years ago
Morgan Pretty 4f3900771e More work on getting SOGS V4 integrated
Updated the MessageSendJob to support V4 messages (V2 messages will be upgraded to V4 if they get re-encoded)
Renamed the Message+Destination from 'openGroup' & 'openGroupV2' to 'legacyOpenGroup' and 'openGroup'
Started plugging in more of the V4 APIs
Renamed a number of the V2 APIs to start with 'legacy'
3 years ago
Morgan Pretty 2284375fc0 Started work on updated SOGS support
Split the OpenGroupAPIV2 into separate files
Started working on the new auth and blinded-id approaches (new auth working with un-blinded id suggesting blinded-id code is incorrect)
Updated the SOGS request/response types to use Codable
Updated the SOGS Request type to use enums instead of strings for keys (to reduce likelihood of typos breaking things)
Updated SessionMessagingKit to use Codable and JSONEncoder/JSONDecoder instead of the legacy JSONSerialization
Cleaned up some naming conventions in the SessionMessagingKit (calling a URLRequest body 'parameters' is very confusing...)
Removed the custom TSRequest class (just using standard URLRequest everywhere instead)
Added a number of extension functions to enable some more functional-coding styles
Added extensions to Sodium methods to allow scalar multiplication and the ability to hash providing a salt and a personalisation value (both needed for new SOGS auth)
Fixed an issue where the legacy auth for SOGS could crash due to threading issues (multiple threads accessing the same variable)
Fixed an issue where if you were in two rooms in a single SOGS and deleted one of them, the other room would stop getting updates as the server public key was getting removed
3 years ago
Morgan Pretty 394b0646a3 Updated the code to support additional session id prefixes 3 years ago
Morgan Pretty 03fb5cbeeb Cleanup and tweaks
Fixed some compilation issues.
Removed an unused dependency.
Cleaned up the Podfile to minimise duplication.
Pointed at an oxen fork of SignalCoreKit instead of a personal one.
3 years ago
Ryan Zhao 5f6da0739e delete message on storage server 4 years ago
Ryan Zhao e8f0d0d124 WIP: delete from storage server 4 years ago
Ryan Zhao c68350f3d8 store hash value for outgoing messages 4 years ago
Niels Andriesse 1a237557ff Add documentation 4 years ago
Niels Andriesse 140f07df96 Disable authenticated retrieval for now 4 years ago
Niels Andriesse 2360af5993 Implement authenticated message retrieval 4 years ago
Niels Andriesse 81820c0013 Remove unnecessary check 4 years ago
Niels Andriesse 8a29469eb5 Handle incorrect clock setting 4 years ago
Niels Andriesse 41fe33525c Don't unnecessarily open sync transactions 4 years ago
Niels Andriesse 498f5a73b0 Don't unnecessarily open sync transactions 4 years ago
Niels Andriesse e84fc1aa04 Include destination info in error messages 4 years ago
Niels Andriesse bea80c67b3 Make error more descriptive 4 years ago
Niels Andriesse ef2eab7e9f Implement SnodeAPI.clearAllData() 4 years ago
Niels Andriesse a774d5f004 Re-use existing build paths promise if possible 4 years ago
nielsandriesse 1b68c109ee Fix build 4 years ago
nielsandriesse 5c699d6bb7 Fix inverted operation 4 years ago
nielsandriesse b694777a71 Fix snode pool updating bug 4 years ago
Niels Andriesse e93af07b61 Fix ONS 4 years ago
Niels Andriesse 371222098b Fix snode pool updating bug 4 years ago
Niels Andriesse be382a6031 Add fix for temporary path building issue 4 years ago
Niels Andriesse e9df213bfe Put feature flags in one place 4 years ago
Niels Andriesse 1561b9436f Fix missing query parameters 4 years ago
nielsandriesse 583f5e3483 Clean 4 years ago
nielsandriesse fec4bfb836 Debug 4 years ago
Niels Andriesse 66181baf2b Debug 4 years ago
Niels Andriesse d39387bf01 Debug 4 years ago
Niels Andriesse 2f67073a5a Implement new snode pool updating method 4 years ago
Niels Andriesse 8aa25af4d5 Rework things in advance of new snode pool updating method 4 years ago
Niels Andriesse 1002cc51ae Remove PoW too low error code handling 4 years ago
Niels Andriesse 727dccfbb7 Remove PoW too low error code handling 4 years ago
Niels Andriesse 2feae0dea4 Debug 4 years ago
Niels Andriesse 8375b598ad Don't hardcode scheme and port 4 years ago
Niels Andriesse fac376bf55 Use HTTP for default session open group server 4 years ago
nielsandriesse 8433c2d4ab Remove debug code 4 years ago
nielsandriesse a76c43973f Increase TTL & remove PoW 4 years ago
Niels Andriesse 89b96447e1
Merge pull request #378 from oxen-io/tls
Self-Signed Seed Node Certificates
4 years ago
nielsandriesse 75f5591fe0 Store certificates in DER format 4 years ago
Niels Andriesse 58748471a4 Set up skeleton code 4 years ago