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

How to access HTTPS certificate ? - Not exported/imported #1986

Closed
LBF38 opened this issue Oct 15, 2023 · 3 comments · Fixed by #2013
Closed

How to access HTTPS certificate ? - Not exported/imported #1986

LBF38 opened this issue Oct 15, 2023 · 3 comments · Fixed by #2013

Comments

@LBF38
Copy link
Contributor

LBF38 commented Oct 15, 2023

Hi, I am searching my way to make the HTTPS certificate trusted on Android device.
To do so, I have tried to get access to the generated certificate from the storage but the device doesn't display the https-cert.pem and https-key.pem files.

Then, I have tried exporting the configuration from within the Syncthing Android app. However, only config.xml, key.pem and cert.pem are exported, not the HTTPS files for the GUI.

Therefore, is it possible to make them exported ? Could I import my own HTTPS certificate from the Import button in the app ?
Do you have an idea on how I could achieve this ?

Thank you in advance for your reply

@bt90
Copy link
Contributor

bt90 commented Oct 16, 2023

You'd need to generate your own CA certificate, create the web UI certificate from that and import the CA certificate into the truststore of Android as the last step.

As you already noted, the file access is the problem here. I think a PR with import/export functionality would be accepted, but I wouldn't hold by breath that someone else will implement this.

@LBF38
Copy link
Contributor Author

LBF38 commented Oct 16, 2023

Thank you for your reply, I'll try to make a PR for the export/import feature when I have more time.
We agree on the solution, the only way is to import the custom HTTPS certificate via the import feature of the app, it is impossible from the file system.
Thx

@tomasz1986
Copy link
Contributor

There is a hack where you add Syncthing's own home folder in the /data partition which the app can access, and you sync it to another device. There, you could then replace the certificate file and sync it back to Android. This isn't the recommended method to it by any means though.

imsodin pushed a commit that referenced this issue Dec 3, 2023
Add support for exporting and importing HTTPS related files
(`https-cert.pem` and `https-key.pem`). It can be used to export/import
a self-signed certificate/custom HTTPS certificate to the Syncthing
instance on Android.

I couldn't launch the app in my IDE so I didn't test the changes. 

Closes #1986
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 a pull request may close this issue.

3 participants