-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Client cert #12408
Client cert #12408
Conversation
Using the new `AdvancedX509KeyManager` class from the `nextcloud-android-library` to add support for servers that require a TLS client certificate to connect. Signed-off-by: Elv1zz <elv1zz.git@gmail.com>
Since the official nextcloud android-library does not have the new `AdvancedX509KeyManager`, the automated tests cannot build th e app. So for that I refer to my fork of the android-library for now. This commit shall be reverted before merge. Signed-off-by: Elv1zz <elv1zz.git@gmail.com>
All interaction with the nextcloud server is handled by the `NextCloudWebViewClient`, so TLS client certificate handling should be done by that class. Since `AuthenticatorActivity` only extends `NextCloudWebViewClient` with some additional methods, it is enough to have the certificate handling in one place. Signed-off-by: Elv1zz <elv1zz.git@gmail.com>
Isntead of having to find the hostname and port from an URL (which might be more tricky than expected), we now can simply pass down the URL and `AdvancedX509KeyManager` will take care of finding the port from the URL. Signed-off-by: Elv1zz <elv1zz.git@gmail.com>
Improving code quality a bit by avoiding magic numbers. Signed-off-by: Elv1zz <elv1zz.git@gmail.com>
The method `onReceivedHttpError` did have 3 exit points (`return`), but Codacy only allows us 2, so error handling for `request?.url` and `view?.context` was combined. Seems debatable, what's more readable, but the rules are the rules. Signed-off-by: Elv1zz <elv1zz.git@gmail.com>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
5243195
to
a6043df
Compare
@Elv1zz I have opened it here again, to have working CI and rebased it. Can you test this once again? After that I will merge it. |
/rebase |
21760f6
to
5f2c3da
Compare
Signed-off-by: github-actions <github-actions@github.com>
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12408.apk |
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
:)
I tested it for about 24 hours now and everything seems to work fine. There is one thing, which does not seem to work completely, but it might be a new thing still under development in the app itself: There is a new notification showing the "upload preparation" progress, which is never going beyond about 20%. Either this is not implemented completely, yet, or it does not fully work with client certificates. But in general photo upload in the background still works.
Yay, already merged 🎉 Looking forward to see this feature in the next release. |
Replaces #11314