klein0r / ioBroker.octoprint

ioBroker adapter to manage your 3D printer over ioBroker
https://haus-automatisierung.com/
MIT License
35 stars 18 forks source link

Self Signed SSL Certs #138

Closed aSilentSniper closed 1 year ago

aSilentSniper commented 1 year ago

The problem

Hi i have Self Signed SSL Certs on my Octoprint Instance but the Adapter cant verify that certs. I would like to have an option to disable the ssl cert check to allow the usage of Self Signed SSL Certs

Version of nodejs

18.16.0

Version of ioBroker js-controller

4.0.24

Version of Adapter

4.0.0

Operating system running ioBroker

Debian Bullseye

Checklist of files to include below

Additional information & file uploads


-- | -- | -- | --
octoprint.0 | 2023-05-23 17:32:54.577 | debug | (version) received error - API is now offline: {"message":"unable to verify the first certificate","name":"Error","stack":"Error: unable to verify the first certificate\n at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)\n at TLSSocket.emit (node:events:513:28)\n at TLSSocket.emit (node:domain:489:12)\n at TLSSocket._finishInit (node:_tls_wrap:959:8)\n at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:743:12)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":2000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","X-Api-Key":"585FE1A02977445CA6BBEFDAC2EDAEB3","User-Agent":"axios/0.27.2"},"method":"get","data":null,"baseURL":"https://octopi.projectpilos.co:443","url":"/api/version","responseType":"json"},"code":"UNABLE_TO_VERIFY_LEAF_SIGNATURE","status":null}
octoprint.0 | 2023-05-23 17:32:54.575 | debug | unable to verify the first certificate
octoprint.0 | 2023-05-23 17:32:54.498 | debug | refreshStateTimeout: re-created refresh timeout (API not connected): id 1825 - seconds: 10
octoprint.0 | 2023-05-23 17:32:54.490 | debug | sending "get" request to "/api/version" without data
octoprint.0 | 2023-05-23 17:32:54.489 | debug | [buildServiceRequest] starting service request
octoprint.0 | 2023-05-23 17:32:54.488 | debug | refreshState: started from "timeout (API not connected)"
octoprint.0 | 2023-05-23 17:32:44.540 | debug | API is offline
octoprint.0 | 2023-05-23 17:32:44.538 | debug | (version) received error - API is now offline: {"message":"unable to verify the first certificate","name":"Error","stack":"Error: unable to verify the first certificate\n at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)\n at TLSSocket.emit (node:events:513:28)\n at TLSSocket.emit (node:domain:489:12)\n at TLSSocket._finishInit (node:_tls_wrap:959:8)\n at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:743:12)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":2000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","X-Api-Key":"585FE1A02977445CA6BBEFDAC2EDAEB3","User-Agent":"axios/0.27.2"},"method":"get","data":null,"baseURL":"https://octopi.projectpilos.co:443","url":"/api/version","responseType":"json"},"code":"UNABLE_TO_VERIFY_LEAF_SIGNATURE","status":null}
octoprint.0 | 2023-05-23 17:32:44.536 | debug | unable to verify the first certificate
octoprint.0 | 2023-05-23 17:32:44.487 | debug | refreshStateTimeout: re-created refresh timeout (API not connected): id 1685 - seconds: 10
octoprint.0 | 2023-05-23 17:32:44.479 | debug | sending "get" request to "/api/version" without data
octoprint.0 | 2023-05-23 17:32:44.478 | debug | [buildServiceRequest] starting service request
octoprint.0 | 2023-05-23 17:32:44.477 | debug | refreshState: started from "timeout (API not connected)"
octoprint.0 | 2023-05-23 17:32:34.581 | debug | API is offline
octoprint.0 | 2023-05-23 17:32:34.580 | debug | (version) received error - API is now offline: {"message":"unable to verify the first certificate","name":"Error","stack":"Error: unable to verify the first certificate\n at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)\n at TLSSocket.emit (node:events:513:28)\n at TLSSocket.emit (node:domain:489:12)\n at TLSSocket._finishInit (node:_tls_wrap:959:8)\n at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:743:12)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":2000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","X-Api-Key":"585FE1A02977445CA6BBEFDAC2EDAEB3","User-Agent":"axios/0.27.2"},"method":"get","data":null,"baseURL":"https://octopi.projectpilos.co:443","url":"/api/version","responseType":"json"},"code":"UNABLE_TO_VERIFY_LEAF_SIGNATURE","status":null}
octoprint.0 | 2023-05-23 17:32:34.578 | debug | unable to verify the first certificate
octoprint.0 | 2023-05-23 17:32:34.476 | debug | refreshStateTimeout: re-created refresh timeout (API not connected): id 1572 - seconds: 10
octoprint.0 | 2023-05-23 17:32:34.465 | debug | sending "get" request to "/api/version" without data
octoprint.0 | 2023-05-23 17:32:34.464 | debug | [buildServiceRequest] starting service request
octoprint.0 | 2023-05-23 17:32:34.463 | debug | refreshState: started from "timeout (API not connected)"
octoprint.0 | 2023-05-23 17:32:24.535 | debug | API is offline
octoprint.0 | 2023-05-23 17:32:24.530 | debug | (version) received error - API is now offline: {"message":"unable to verify the first certificate","name":"Error","stack":"Error: unable to verify the first certificate\n at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)\n at TLSSocket.emit (node:events:513:28)\n at TLSSocket.emit (node:domain:489:12)\n at TLSSocket._finishInit (node:_tls_wrap:959:8)\n at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:743:12)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":2000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","X-Api-Key":"585FE1A02977445CA6BBEFDAC2EDAEB3","User-Agent":"axios/0.27.2"},"method":"get","data":null,"baseURL":"https://octopi.projectpilos.co:443","url":"/api/version","responseType":"json"},"code":"UNABLE_TO_VERIFY_LEAF_SIGNATURE","status":null}
octoprint.0 | 2023-05-23 17:32:24.527 | debug | unable to verify the first certificate
octoprint.0 | 2023-05-23 17:32:24.462 | debug | refreshStateTimeout: re-created refresh timeout (API not connected): id 1428 - seconds: 10
octoprint.0 | 2023-05-23 17:32:24.446 | debug | sending "get" request to "/api/version" without data
octoprint.0 | 2023-05-23 17:32:24.444 | debug | [buildServiceRequest] starting service request
octoprint.0 | 2023-05-23 17:32:24.442 | debug | refreshState: started from "timeout (API not connected)"
octoprint.0 | 2023-05-23 17:32:14.529 | debug | API is offline
octoprint.0 | 2023-05-23 17:32:14.528 | debug | (version) received error - API is now offline: {"message":"unable to verify the first certificate","name":"Error","stack":"Error: unable to verify the first certificate\n at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)\n at TLSSocket.emit (node:events:513:28)\n at TLSSocket.emit (node:domain:489:12)\n at TLSSocket._finishInit (node:_tls_wrap:959:8)\n at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:743:12)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":2000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","X-Api-Key":"585FE1A02977445CA6BBEFDAC2EDAEB3","User-Agent":"axios/0.27.2"},"method":"get","data":null,"baseURL":"https://octopi.projectpilos.co:443","url":"/api/version","responseType":"json"},"code":"UNABLE_TO_VERIFY_LEAF_SIGNATURE","status":null}
octoprint.0 | 2023-05-23 17:32:14.526 | info | error UNABLE_TO_VERIFY_LEAF_SIGNATURE from /api/version: unable to verify the first certificate
octoprint.0 | 2023-05-23 17:32:14.442 | debug | refreshStateTimeout: re-created refresh timeout (API not connected): id 1321 - seconds: 10
octoprint.0 | 2023-05-23 17:32:14.290 | debug | sending "get" request to "/api/version" without data
octoprint.0 | 2023-05-23 17:32:14.289 | debug | [buildServiceRequest] starting service request
octoprint.0 | 2023-05-23 17:32:14.288 | debug | refreshState: started from "onReady"
octoprint.0 | 2023-05-23 17:32:14.204 | debug | API is offline
octoprint.0 | 2023-05-23 17:32:14.159 | info | starting. Version 4.0.0 in /opt/iobroker/node_modules/iobroker.octoprint, node: v18.16.0, js-controller: 4.0.24
octoprint.0 | 2023-05-23 17:32:13.191 | debug | Plugin sentry Initialize Plugin (enabled=true)
octoprint.0 | 2023-05-23 17:32:13.191 | debug | Plugin sentry Initialize Plugin (enabled=true)
octoprint.0 | 2023-05-23 17:32:13.012 | debug | States connected to redis: 127.0.0.1:9000
octoprint.0 | 2023-05-23 17:32:12.938 | debug | States create User PubSub Client
octoprint.0 | 2023-05-23 17:32:12.935 | debug | States create System PubSub Client
octoprint.0 | 2023-05-23 17:32:12.914 | debug | Redis States: Use Redis connection: 127.0.0.1:9000
octoprint.0 | 2023-05-23 17:32:12.856 | debug | Objects connected to redis: 127.0.0.1:9001
octoprint.0 | 2023-05-23 17:32:12.842 | debug | Objects client initialize lua scripts
octoprint.0 | 2023-05-23 17:32:12.783 | debug | Objects create User PubSub Client
octoprint.0 | 2023-05-23 17:32:12.781 | debug | Objects create System PubSub Client
octoprint.0 | 2023-05-23 17:32:12.777 | debug | Objects client ready ... initialize now
octoprint.0 | 2023-05-23 17:32:12.715 | debug | Redis Objects: Use Redis connection: 127.0.0.1:9001
host.iobroker | 2023-05-23 17:32:10.564 | info | instance system.adapter.octoprint.0 started with pid 9348```