zadam / trilium-sender

Simple android application for sending images and notes to Trilium
GNU General Public License v3.0
80 stars 31 forks source link

self-signed certificates #2

Open pcause opened 5 years ago

pcause commented 5 years ago

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 commented 4 years ago

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 commented 4 years ago

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:

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:

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 commented 4 years ago

@jkurei looks good, send a PR ;-)