Skip to content
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

Add support for client certificates #771

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stephanritscher
Copy link

This adds support for providing client certificates (which can be picked from system certificate store or from file system) and for accepting self-signed single server certificates without storing them in system certificate store.
This is realized via two libraries which have minimal impact on the application code and thus are easy to maintain. MemorizingTrustManager only has been forked by me due to a build issue with current gradle version (we should switch back to the original project after my pull request has been merged), InteractiveKeyManager has been developed by me inspired by MemorizingTrustManager.

@dominiczedler
Copy link
Collaborator

Sorry for the delay, I will look into it as soon as I have time after my bachelor thesis. Thanks for your pull request.

@patzly
Copy link
Owner

patzly commented Sep 6, 2023

Is it possible to keep minSdk 21? Else this would be a rather drastic change, I think a few people are running Grocy Android on old tablets e. g. in the kitchen, these devices often have early Android versions.

@stephanritscher
Copy link
Author

Hi, this is due to InteractiveKeyManager which is my own project and not too big, so I could give it a try if you are interested in integrating the PR.

@patzly
Copy link
Owner

patzly commented Sep 7, 2023

I see, this would be cool! Maybe you could just surround the methods that don't exist on API <23 with if/else in your library? So that the client certificats feature is maybe only working on devices with API 23+ and we would be able to keep minSdk 21?

@stephanritscher
Copy link
Author

I think I got it - only one place to change in the end.

@stephanritscher
Copy link
Author

Any objections so far? It's working flawlessly on my side and I just noticed a minor conflict which came up in the PR - I hope to resolve it later today.

@koostamas
Copy link

@patzly and @dominiczedler Can you review this PR? I would like to see the feature implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants