-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
[BUG] HTTPS API request not supported - net::ERR_CERT_AUTHORITY_INVALID #102
Comments
Useful resources : |
Link to the open topic for this issue : |
Here is a SO response to add the CA to a fetch request : https://stackoverflow.com/questions/31861109/tls-what-exactly-does-rejectunauthorized-mean-for-me But the issue is that it is possible in a nodejs environment, thus not on mobile. |
As far as I know, here are some solutions/ideas I have found to resolve, in some way, the HTTPS issue :
|
Links :
|
From the Syncthing Forum answers :
|
Problem solved on PC / Desktop !!! 🎉
openssl genrsa -out https-key.pem 2048
openssl req -new -x509 -key https-key.pem -out https-cert.pem -days 1095 -subj "/CN=localhost/O=Syncthing/OU=Syncthing Automatically Generated" -addext "subjectAltName = DNS:localhost" Note The
openssl x509 -in https-cert.pem -outform der -out https-cert.cer
Now, I need to test this on mobile to see if it also works !! |
This issue should now be solved thanks to this PR (syncthing/syncthing-android#2013). The setup needs to be tested before closing this issue. |
Any updates to this? I followed your steps on Mac, added the localhost certificate to keychain access but it doesn't work. |
Describe the bug
Can't make an HTTPS API request to the Syncthing REST API. It throws an error.
Same issue on mobile too.
To Reproduce
Steps to reproduce the behavior:
https
protocol.Expected behavior
Should display "Syncthing Ping : Pong" to correctly check the API status.
Screenshots
On Desktop :
![image](https://private-user-images.githubusercontent.com/96347823/261674238-9afa2d62-cf70-42b0-bce0-f03a33f1867c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTU2NjIsIm5iZiI6MTczOTE1NTM2MiwicGF0aCI6Ii85NjM0NzgyMy8yNjE2NzQyMzgtOWFmYTJkNjItY2Y3MC00MmIwLWJjZTAtZjAzYTMzZjE4NjdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAyNDI0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU2ZWJiOWRhYzZmN2RlYTY2MWQyNzc4MTBmYjg1YTEzMmYzNjVkNmM2ODRlZTFmY2M5OTljZTQwZGNhNTFmOGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vvDWXeB8SgsUB1OugvTVIl5qtyursPajiorBWXw0v58)
On Mobile :
![image](https://private-user-images.githubusercontent.com/96347823/261675031-fa0e8a30-b7a0-4311-a0aa-e75be3516f11.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTU2NjIsIm5iZiI6MTczOTE1NTM2MiwicGF0aCI6Ii85NjM0NzgyMy8yNjE2NzUwMzEtZmEwZThhMzAtYjdhMC00MzExLWEwYWEtZTc1YmUzNTE2ZjExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAyNDI0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJmODdkNGJkYmY5ZmU4MWMxZDYzZTlhMzQ2OGM2ZjM1ZTg1OGM2Njg4N2EwMTM0NzNmZjkyNDY1YmZjZGY1Y2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.P8iDjwwWP-oMTyOhEE3ei5R4AtBz1CEP5doLBk1Thag)
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Need to make some researches on HTTPS requests.
The text was updated successfully, but these errors were encountered: