phpbg / easysync

Synchronize your android phone/tablet with your DAV server, the easy way.
MIT License
105 stars 6 forks source link

Add the option for "Allow self-signed cert" #39

Open Plexprofile opened 2 months ago

Plexprofile commented 2 months ago

In the current version 1.10 an error message would popup when trying to connect to a webdav server saying :

Error: java.security.cert. CertPath ValidatorException: Trust anchor for certification path not found

This seems to have something to do with the " self-signed cert" settings because I had the same issue with another app called folder sync and had it fixed by enabling the "allow self-signed cert" Screenshot_20240830-145354_Easy_Sync~01 Screenshot_20240830-150104_FolderSync_Pro~01

phpbg commented 2 months ago

Hi,

have you tried this: https://github.com/phpbg/easysync?tab=readme-ov-file#use-a-self-signed-or-a-custom-certificate

Regards

Le ven. 30 août 2024, 09:02, Plexprofile @.***> a écrit :

In the current version 1.10 an error message would popup when trying to connect to a webdav server saying :

Error: java.security.cert. CertPath ValidatorException: Trust anchor for certification path not found

This seems to have something to do with the " self-signed cert" settings because I had the same issue with another app called folder sync and had it fixed by enabling the "allow self-signed cert" Screenshot_20240830-145354_Easy_Sync.01.png (view on web) https://github.com/user-attachments/assets/1cf11776-5c6b-4c7a-a249-40f5eb81c926 Screenshot_20240830-150104_FolderSync_Pro.01.png (view on web) https://github.com/user-attachments/assets/6793199c-811e-40d6-a793-7b2e923fa4fa

— Reply to this email directly, view it on GitHub https://github.com/phpbg/easysync/issues/39, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKKPC2L5UBUV7FCGQVSB2WLZUAKHZAVCNFSM6AAAAABNL33CKSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4TMNBQHA4TKMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Plexprofile commented 2 months ago

Sorry, but I do not know where the trusted certificate can be found, should I request that certificate from my webdav provider or should I create and edit the certificate myself? Would be very helpful if there is any instructions

phpbg commented 2 months ago

You can issue this command from a terminal: openssl s_client -showcerts -connect www.example.com:443 Replace www.example.com:443 with your webdav hostname.

Anyway, you mention a webdav provider. Self signed certificate are only used when you are self hosting your webdav server. If you do have a provider, iy should issue valid certificates, ask it's support.

itmagpro commented 1 month ago

Confirm! Now try this prog, but not want and not can make unwanted jobs: extract cert from server; import in devices; many etc...

For self-signed webdav this prog just trash! ;(

Just add knob in code for disable cert validation!

phpbg commented 1 month ago

@Plexprofile have you tried the suggested command?

Which webdav provider issues self signed certificate? Any commercial hosting service should come with a valid certificate, otherwise don't pay for it.

Plexprofile commented 1 month ago

@Plexprofile have you tried the suggested command?

Which webdav provider issues self signed certificate? Any commercial hosting service should come with a valid certificate, otherwise don't pay for it.

Teracloud

Plexprofile commented 1 month ago

@Plexprofile have you tried the suggested command?

Which webdav provider issues self signed certificate? Any commercial hosting service should come with a valid certificate, otherwise don't pay for it.

haven't tried these command yet