BoschSmartHome / bosch-shc-api-docs

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

SSL alert number 42 bad certificate #25

Closed jo-me closed 4 years ago

jo-me commented 4 years ago

I followed the instructions to create a new client which worked fine. However, aside from the "Public Information" request I only receive the following "bad certificate" responses:

Error: write EPROTO 13412:error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate:c:\users\administrator\buildkite-agent\builds\pm-electron\postman\electron-release\vendor\node\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1407:SSL alert number 42

The certificate and key are added for both ports 8443 and 8444 in postman settings.

This is how the create client request payload looked like: image

Any ideas?

philbuettner commented 4 years ago

Hi jo-me,

verify that you pressed the SHC button before sending the request and that your system password is encoded correctly: https://github.com/BoschSmartHome/bosch-shc-api-docs/issues/11#issuecomment-553166491

Kind regards Phil

jo-me commented 4 years ago

I verified the system password again. It was encoded like described.

The "new client" request was successful as stated in the first post - it returned an url and token in the response. The new client shows up in the app as well. I long-pressed the button before issuing the request so I guess it worked.

I created the certificate with openssl on Windows 10 if that matters.

jo-me commented 4 years ago

I redid it from scratch and now it works. Created the certificate on Ubuntu this time but with the same commands (like in your description). Not sure what was wrong now.. bu it was not the pairing or system password. Something with the certs must have gone wrong...

Thanks for your help though ;)