The "options.ca" property must be one of type string, Buffer, TypedArray, or DataView. Received type object #4

Закрыто
открыт 2019-03-11 15:34:37 +00:00 пользователем Ghost · комментариев: 2
Ghost прокомментировал(а) 2019-03-11 15:34:37 +00:00
Needs latest SSL Root Certificate Authority data /home/seollar/null_db/node_modules/ssl-root-cas/ssl-root-cas-latest.js

Loading latest certificates from https://mxr.mozilla.org/nss/source/lib/ckfw/builtins/certdata.txt?raw=1
_tls_common.js:81
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "options.ca" property must be one of type string, Buffer, TypedArray, or DataView. Received type object
    at validateKeyCert (_tls_common.js:81:11)
    at Object.createSecureContext (_tls_common.js:113:9)
    at Server.setSecureContext (_tls_wrap.js:976:27)
    at Server (_tls_wrap.js:856:8)
    at new Server (https.js:61:14)
    at Object.createServer (https.js:84:10)
    at Object.createServer 
(/home/seollar/null_db/node_modules/hardhttps/hardhttps.js:63:22)
    at makewss (/home/seollar/null_db/database_server.js:48:29)
    at /home/seollar/null_db/database_server.js:61:5
    at /home/seollar/null_db/driver.js:65:66
Needs latest SSL Root Certificate Authority data /home/seollar/null_db/node_modules/ssl-root-cas/ssl-root-cas-latest.js Loading latest certificates from https://mxr.mozilla.org/nss/source/lib/ckfw/builtins/certdata.txt?raw=1 _tls_common.js:81 throw new ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The "options.ca" property must be one of type string, Buffer, TypedArray, or DataView. Received type object at validateKeyCert (_tls_common.js:81:11) at Object.createSecureContext (_tls_common.js:113:9) at Server.setSecureContext (_tls_wrap.js:976:27) at Server (_tls_wrap.js:856:8) at new Server (https.js:61:14) at Object.createServer (https.js:84:10) at Object.createServer (/home/seollar/null_db/node_modules/hardhttps/hardhttps.js:63:22) at makewss (/home/seollar/null_db/database_server.js:48:29) at /home/seollar/null_db/database_server.js:61:5 at /home/seollar/null_db/driver.js:65:66
coolaj86 прокомментировал(а) 2019-03-11 15:37:19 +00:00
Владелец

Looks like you passed in an object instead of one of the acceptable types in you code.

Looks like you passed in an object instead of one of the acceptable types in you code.
Ghost прокомментировал(а) 2019-03-11 16:05:23 +00:00
Автор

I have changed my old code:

require(__dirname+'/node_modules/ssl-root-cas/latest');

into:

require(__dirname+'/node_modules/ssl-root-cas/latest').rootCas.join('');

Which solved the problem

Thanks for the quick reply!

I have changed my old code: require(__dirname+'/node_modules/ssl-root-cas/latest'); into: require(__dirname+'/node_modules/ssl-root-cas/latest').rootCas.join(''); Which solved the problem Thanks for the quick reply!
Ghost закрыл(а) эту задачу 2019-03-11 16:05:23 +00:00
Войдите, чтобы присоединиться к обсуждению.
Нет меток
2 участников
Уведомления
Срок выполнения
Срок выполнения не установлен.
Зависимости

Зависимостей нет.

Ссылка: coolaj86/ssl-root-cas.js#4
Описание отсутствует.