diff --git a/README.md b/README.md index f28f0ca..99347cf 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,9 @@ Connect your Philips Hue Lights with ioBroker. Please also see [release page](https://github.com/Zefau/ioBroker.hue-extended/releases) for changelog and detailed information. +### 1.2.1 (2019-02-03) +- (Zefau) fixed failing secure connection when selecting default certificates + ### 1.2.0 (2019-11-23) - (Zefau) added option to change `transitiontime` on scenes (see [#24](https://github.com/Zefau/ioBroker.hue-extended/issues/24)) diff --git a/hue-extended.js b/hue-extended.js index ca9f006..3f8f575 100644 --- a/hue-extended.js +++ b/hue-extended.js @@ -77,14 +77,14 @@ function startAdapter(options) { REQUEST_OPTIONS = { ...REQUEST_OPTIONS, - 'cert': _fs.readFileSync(adapter.config.certPublicPath), - 'key': _fs.readFileSync(adapter.config.certPrivatePath), + 'cert': adapter.config.certPublicPath.indexOf('.') === -1 ? adapter.config.certPublicPath : _fs.readFileSync(adapter.config.certPublicPath), + 'key': adapter.config.certPrivatePath.indexOf('.') === -1 ? adapter.config.certPrivatePath : _fs.readFileSync(adapter.config.certPrivatePath), 'rejectUnauthorized': false, 'secureConnection': true }; if (adapter.config.certChainedPath) - REQUEST_OPTIONS.ca = _fs.readFileSync(adapter.config.certChainedPath); + REQUEST_OPTIONS.ca = adapter.config.certChainedPath.indexOf('.') === -1 ? adapter.config.certChainedPath : _fs.readFileSync(adapter.config.certChainedPath); if (REQUEST_OPTIONS.key.indexOf('ENCRYPTED') > -1) REQUEST_OPTIONS.passphrase = adapter.config.passphrase; diff --git a/package-lock.json b/package-lock.json index bc4e0db..c962259 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,9 +13,9 @@ } }, "@iobroker/testing": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-2.0.1.tgz", - "integrity": "sha512-P0d557mUP4p1DCvMhoDi2m2P0Bu9/KjF0ItaaMd5J7cui0cbXCKioxbc041RdzR3daSH5tMY5JCt/UsXbQ3Jlg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-2.0.2.tgz", + "integrity": "sha512-o3Som1Jaugdt3KstzZHA/+rx4tqvnspEJGgo+2BMbtYntza9tVzIzJzhudjSwbmAdd1au/qIpqHuZOclkQe9Qg==", "dev": true, "requires": { "alcalzone-shared": "~2.2.0", @@ -73,9 +73,9 @@ } }, "@types/node": { - "version": "13.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.5.0.tgz", - "integrity": "sha512-Onhn+z72D2O2Pb2ql2xukJ55rglumsVo1H6Fmyi8mlU9SvKdBk/pUSUAiBY/d9bAOF7VVWajX3sths/+g6ZiAQ==" + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.0.tgz", + "integrity": "sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==" }, "ajv": { "version": "6.10.2", @@ -4025,9 +4025,9 @@ } }, "sinon": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.1.0.tgz", - "integrity": "sha512-6/05TR+8QhEgTbyMWaConm8iPL609Eno7SqToPq63wC/jS/6NMEI4NxqtzlLkk3r/KcZT9xPXQodH0oJ917Hbg==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.1.1.tgz", + "integrity": "sha512-E+tWr3acRdoe1nXbHMu86SSqA1WGM7Yw3jZRLvlCMnXwTHP8lgFFVn5BnKnF26uc5SfZ3D7pA9sN7S3Y2jG4Ew==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", diff --git a/package.json b/package.json index 6f741ba..bddd3dd 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ } ], "dependencies": { - "@iobroker/adapter-core": "^2.1.0", + "@iobroker/adapter-core": "^2.2.1", "color-convert": "^2.0.1", "request": "^2.88.0", "request-promise": "^4.2.5" @@ -46,11 +46,11 @@ "deprecated": false, "description": "Integration of your Philips Hue Lights with your ioBroker", "devDependencies": { - "@iobroker/testing": "^2.0.0", - "axios": "^0.19.1", + "@iobroker/testing": "^2.0.2", + "axios": "^0.19.2", "chai": "^4.2.0", "gulp": "^4.0.2", - "mocha": "^7.0.0" + "mocha": "^7.0.1" }, "directories": { "lib": "lib",