toniebox-reverse-engineering / teddycloud

teddyCloud is an open source server replacement for the Boxine Cloud
https://toniebox-reverse-engineering.github.io/docs/tools/teddycloud/
GNU General Public License v2.0
478 stars 36 forks source link

Failed to load certificate #261

Closed RosaEinhorn closed 2 days ago

RosaEinhorn commented 2 days ago

Hi everyone,

thank you for creating this amazing project. I would love to try it out, but it always fails to load the certificates . I tried an UnRAID system, a Home Assistant Addon and to run it locally on docker on a MacBook Pro. I am always getting the same error:

INFO |settings.c:0809:settings_load_ovl| Load settings from /teddycloud/config/config.ini
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0204:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
ERROR|tls_adapter.c:0189:read_certificate| Failed to open '/teddycloud/certs/client/ca.der' for cert type detection
ERROR|tls_adapter.c:0376:load_cert| Loading cert '/teddycloud/certs/client/ca.der' failed
ERROR|tls_adapter.c:0189:read_certificate| Failed to open '/teddycloud/certs/client/client.der' for cert type detection
ERROR|tls_adapter.c:0376:load_cert| Loading cert '/teddycloud/certs/client/client.der' failed
ERROR|tls_adapter.c:0189:read_certificate| Failed to open '/teddycloud/certs/client/private.der' for cert type detection
ERROR|tls_adapter.c:0376:load_cert| Loading cert '/teddycloud/certs/client/private.der' failed

Any idea on how to solve this? Thanks a lot in advance.

RosaEinhorn commented 2 days ago

Just found out that this is related to the client certs that I have to load from the toniebox. However, I cannot access TeddyBox via HTTPs to to so (I have the ESP32 version). The log shows a HTTPs Web Connection, but the browser cannot load the page:

INFO |server.c:0929:server_init| 1 open HTTPS Web connections
RosaEinhorn commented 2 days ago

Closing this as it was my own fault: The "Proceed to HTTPS"-button did not work as it send me to a https-URL with the wrong port (how should it know better?). Using https-protocol and the correct port made it work.