-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
End-to-end encryption support #264
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d from an event but at present its necessary to hardcode your decryption key which in future will be provided in the auth response from the server.
…oad of Pusher 'System' events (that have event names prefixed "pusher:" or "pusher_internal:")
…kspace/projects are setup so that the demo apps copy the Carthage frameworks.
…toSwift convenience functions which are unavilable now that CryptoSwift has been removed.
E2E Decrypt
Store shared secret for private encrypted channels
* Removed empty Images.xcassets reference from`iOS Example Swift.xcodeproj` * Consumption-test: Added shared code * Consumption-tests: adding .gitignore * Consumption-tests: adding first pass at Carthage tests. * Consumption-tests: add macOS targets. * Consumption-tests: resolved a couple of build warnings. * Consumption-tests: updated scripts so they can be executed from any directory, * Consumption-tests: adding `Carthage-MinimumXcode` for testing Xcode 11. * Consumption-tests: moved important build settings into xcconfig. * Consumption-tests: renamed Carthage-LatestXcode to Carthage-Latest and Carthage-MinimumXcode to Carthage-Minimum (since they verify more than just the Xcode version, also swift versions and deployment_targets) * Consumption-tests: introduced a `config.xconfig` to shortcut to X_SUPPORTED_VERSIONS.xcconfig because this means that the xcodeproj's are identical and can be copied and pasted. * Consumption-tests: added `run-tests-LOCALLY.sh` * Consumption-tests: added `say` command for Xcode missing failure. * Consumption-tests: updated projects so that `carthage-copy-platform-specific-frameworks.sh` is only invoked if its a Carthage based project (this will allow us to use the same project for Cocoapods). * Consumption-tests: fixed `carthage-checkout.sh` in the event that working copy is clean. * Consumption-tests: TEMPORARILY removed tvOS support so that things actually compile successfully. * Consumption-tests: ensure script exits with error code so a calling script does not continue if carthage update fails. * Consumption-tests: improved console output (so its clearer which test/scheme failed) * Consumption-tests: corrected accidental check in. * Consumption-tests: added `-allowProvisioningUpdates` flag to `xcodebuild` so that it pulls latest provisioning profiles from Apple. * Consumption-tests: moved `assignXcodeAppPathFor` function into dedicated file so it can be shared between scripts. * Consumption-tests: added option of specifying flags with the `run-tests-LOCALLY.sh` script to skip certain aspects. * Consumption-tests: rijigged some of the script operations in preparation of adding Cocoapods support. * Consumption-tests: removed Carthage specific FRAMEWORK_SEARCH_PATHS out of project and into xcconfig. * Consumption-tests: simplified checkout.sh scripts. * Consumption-tests: removed hardcoding of X_SUPPORTED_XCODE_VERSION in favour of deriving the value from the directory name. * Consumption-tests: further removal of hardcoded X_SUPPORTED_XCODE_VERSION in favour of deriving the value from the directory name. Has allowed me to get rid of some scripts altogether. * Consumption-tests: added Cocoapods-Latest support. * *** Because Sodium has a MACOSX_DEPLOYMENT_TARGET of 10.11 we must increase our MACOSX_DEPLOYMENT_TARGET to 10.11. *** * Consumption-tests: added Cocoapods-Minimum support. * Consumption-tests: removed explicit reference to PusherSwift.framework from the projects. This means all the projects are identical. * Added `PusherSwiftWithEncryption` target/framework. * Updated .travis.yml to use `xcode11` * Updated SUPPORTED_PLATFORMS so that PusherSwift supports iOS, macOS and tvOS but PusherSwiftWithEncryption only supports iOS & macOS (since Sodium doesn't work with tvOS). * Updated simulator device now we're using Xcode 11. * Consumption-tests: Added *-WithEncryption support. * Removed all DEPLOYMENT_TARGET values from *targets* because it is already defined in the *project* settings. * Consumption-tests: removed `pod deintegrate` step because this was causing the project files to change on every run (and pollute the working copy) * Consumption-tests: removed "Recovered References" from projects. * Consumption-tests: Added SwiftPackageManager support. * Removed `Sodium` from list of copied Carthage frameworks in `PusherSwiftTests` since its no longer used. This was causing the tvOS tests to fail. * Updated README.md to say that only Xcode 11 and above is supported. * First draft of `Consumption-Tests/README.md` * Further updates to `Consumption-Tests/README.md` * `Consumption-Tests/README.md` anchor fixes. * `Consumption-Tests/README.md` anchor fixes. * Consumption-tests: Added scripts for CI. * Removed tvos `PusherSwiftWithEncryption.podspec` since this framework does not support tvOS. * Updated SWIFT_VERSION to 4.2 since this is what we say we support in the main README.md. Also improvements to `Consumption-Tests/README.md`. * Fixed a small issue with updating SWIFT_VERSION to 4.2 * Add tvOS tests (#250) * Consumption-tests: fixed issues where certain DEPLOYMENT_TARGETs were harcoded in the project file and therefore not being derived from the xcconfig. This has resolved the weird issue with not being able set the latest IPHONEOS_DEPLOYMENT_TARGET higher than 10. * Consumption-tests: The previous commit/fix has also resolved an issue I was having with Cocoapods and has allow me to remove the custom setting of `MACOSX_DEPLOYMENT_TARGET`. Co-authored-by: Oliver Pearmain <oliverpearmain@gmail.com> Co-authored-by: Tom Kemp <TomKemp@users.noreply.github.com>
WIP: E2E retry
Travis Improvements
…cket-swift into e2e-functional-tests * 'e2e-functional-tests' of github.com:pusher/pusher-websocket-swift: Add test for subscribing to private encrypted channel
Tests/PusherSwiftWithEncryption-Only/PusherEventQueue+DecryptionTests.swift
Outdated
Show resolved
Hide resolved
mdpye
approved these changes
Apr 23, 2020
Codecov Report
@@ Coverage Diff @@
## master #264 +/- ##
=======================================
Coverage 89.53% 89.53%
=======================================
Files 39 39
Lines 3411 3411
=======================================
Hits 3054 3054
Misses 357 357 Continue to review full report at Codecov.
|
mdpye
reviewed
Apr 24, 2020
Co-Authored-By: Mike Pye <mail@mdpye.co.uk>
mdpye
approved these changes
Apr 24, 2020
Kory2019
added a commit
to swaglive/pusher-websocket-swift
that referenced
this pull request
Jul 27, 2020
* pusher-master: Fixed a few typos in README (pusher#271) Clarify Carthage frameworks in README (pusher#268) Remove beta label from private encrypted channel docs (pusher#267) v8.0.0 Temporary message (pusher#266) Disable extension safe API for WithEncryption (pusher#265) End-to-end encryption support (pusher#264) # Conflicts: # PusherSwift.podspec # PusherSwift.xcodeproj/project.pbxproj # Sources/PusherConnection.swift
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for end-to-end encryption by introducing a new
PusherSwiftWithEncryption
target.This PR also:
PusherSwift
andPusherSwiftWithEncryption
are tested. Currently, these can only run locally.encrypted
config option touseTLS
in order make it clear that option isn't related to end-to-end encryption.There are breaking changes in this PR (the minimum deployment target bump and the config option change) so the changes will be released as a new major version.