BoschSmartHome / bosch-shc-api-docs

Bosch Smart Home Controller Local REST API
Other
208 stars 44 forks source link

Unrecognised Certificate? #43

Closed stevecrox closed 3 years ago

stevecrox commented 3 years ago

I've created certs following the postman instructions connecting to the public information on port 8446 works without issue (even if I add the certificate to that port). However connections on port 8443 or 8444 result in the following error:

Error: write EPROTO 8203879879560:error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN:../../third_party/boringssl/src/ssl/tls_record.cc:587:SSL alert number 46

I converted the crt/key into a pem and ran the request as curl command (see below)

curl -kv --cert ~/Downloads/client/client.pem https://192.168.1.103:8443/smarthome/clients --data '{ "@type": "client", "id": "oss_haas", "name": "OSS HomeAssistant", "primaryRole": "ROLE_RESTRICTED_CLIENT", "certificate": "-----BEGIN CERTIFICATE-----\r<removed>\r-----END CERTIFICATE-----" }' This resulting in the Bosch Controller responding with:

`* Trying 192.168.1.103:8444...

Which suggests the Bosch controller is expecting the certificate to be signed by a known certificate authority and rejecting the request as it's a self signed certificate.

Any thoughts on what I need to do?

sebastianharder commented 3 years ago

@stevecrox did you press the button on the Smart Home Controller?

Flowr-es commented 3 years ago

had a similiar issue and actually I just forgot to press the pairing button on the controller. Probably it would be worth to highlight this step a bit more here in the docs :-)