Piwigo / Piwigo-Android

Piwigo Native Android App
GNU General Public License v3.0
140 stars 43 forks source link

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found #269

Open niladrishekhar opened 3 years ago

niladrishekhar commented 3 years ago

What is the workaround for this ? I am using Debian Nginx with self signed certificated - I tried using certbot and other options but it seems CA certificates are not provided for internal domains. I am using Piwigo internally only with no access to the internet and I prefer to keep it this way. On android I am getting this issue over the LAN - I did also mail the certificates and then installed them in the mobile - but still the issue remains.

pasaongithub commented 3 years ago

Me too. I'm using Xiaomi Redmi 9 with MIUI Global 12.0.2 (Android version: 10 Q1A. 190711.020, security patch level 2021-03-01) with last Mobile App for Android and Piwigo 11.4.0 on an internal NAS. I get the same error message when I try to login regardless of over the internet or LAN. My piwigo server is behind a router and I cannot use to connect the standard http (80) or https (443) port from the internet. I configure a valid external port for the piwigo access and there is a port forwarding on the router. I configure this external port for the mobile app, but the login fail. I try to connect using these same settings on a Windows 10 laptop and it works fine.

niladrishekhar commented 3 years ago

Hi, I was facing issues with Piwigo and Nextcloud. I am hosting them both on my laptop and are internal facing - this is what I did to resolve the issue for both.

  1. Added the internal domain to my DNS registry - "etc/hosts" as an entry 127.0.0.1 piwigo internal domain
  2. Then I logged into the router there is a section for DNS - added the ip address of the laptop 192.168.1.16 and piwigo internal domain I did repeat the same for nextcloud as well

I am a NOOB and I am not sure why it worked.

mmguero commented 3 years ago

I'm not a dev for the project, but I think that issue #219 being resolved should fix this issue.

pasaongithub commented 3 years ago

There is no possibility to set the self signed certificated to accept by Mobile App for Android. It simply says: "java.security.cert.CertPathValidatorException: Trust anchor for certification path not found" I can login to Piwigo via Chrome or any other browser. The app only accepts third party signed certificates if the the Piwigo is behind a router/firewall configured port forwarding.

manuelwenner commented 2 years ago

Hi, I'm facing the same issue. I'm hosting Piwigo and my Pi and use a self-signed certificate. Any hints other apps? I thought the issue is closed with #254