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

Closed
opened 2019-03-11 15:34:37 +00:00 by Ghost · 2 comments
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
Owner

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.
Author

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 closed this issue 2019-03-11 16:05:23 +00:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coolaj86/ssl-root-cas.js#4
No description provided.