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

self-signed certificates #2

Open
pcause opened this issue Jan 18, 2019 · 3 comments
Open

self-signed certificates #2

pcause opened this issue Jan 18, 2019 · 3 comments

Comments

@pcause
Copy link

pcause commented Jan 18, 2019

Can you add an option to set up of the app to ignore the error for self-signed certificate. Yes, I also asked for this in the main app, but I know you can do this for android apps as I have other apps that do this. I understand the security issue so perhaps warn the used when they select to do this.

@jkurei
Copy link

jkurei commented May 5, 2020

I'm running into the same issue. I installed my self-signed cert on my phone but for some reason the app doesn't use it.

May be there is no need to fix this with code if there is some way to make it use it...

@jkurei
Copy link

jkurei commented May 13, 2020

I couldn't make it work with my self-signed cert. I switched to a Let's Encrypt cert and it didn't work either.

I've fixed this issue by putting the OkHttp3 client in a wrapper with a custom trust provider. I've also modified the Settings page by adding three options:

  • use the default certs, adding the let's encrypt one just in case;
  • use a custom cert, with an option to paste your .pem, specially intended for self-signed certs;
  • and finally, just for testing, an option to trust all certs (shows a warning).

Screenshot_20200513-052902

@zadam I can send you a PR, if you think some of this has value. The changes are in this commit, but because I am not used to android development I modified a lot of unrelated files. The relevant ones:

  • CustomTrust, a poorly named wrapper on okhttp3: (in Java because it's what I know best, but I can convert it to kotlin easily.

  • Login activity and its layout, where i've added the new fields.

I love Trillium and I really like some of the changes you've been doing since I last used it; this simple app is also a great extra. Thanks a lot for your work!

@zadam
Copy link
Owner

zadam commented May 13, 2020

@jkurei looks good, send a PR ;-)

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

No branches or pull requests

3 participants