node-opcua: Error: cannot locate certificate file node_modules\node-opcua\certificates\client_selfsigned_cert_102 4.pem
Install was ok. node-opcua version: 0.0.57
What I get:
node_modules\node-opcua\lib\client\client_base.js:68
throw new Error(" cannot locate certificate file "+options.certificateFile );
^
Error: cannot locate certificate file node_modules\node-opcua\certificates\client_selfsigned_cert_102
4.pem
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 4
- Comments: 23 (8 by maintainers)
Commits related to this issue
- fix issue with antivirus making openssl not accessible for a short while after downloading #254 — committed to node-opcua/node-opcua by erossignon 8 years ago
the certificate file doesn’t seems to exists `node_modules\node-opcua\certificates\client_selfsigned_cert_1024.pem``
This could be due to the fact that the default certifcate creation has failed:
You can run:
to create a new certificate store with sample certificates. This script will be also more verbose and give you some useful ouput to diagnose the issue.
And make sure your client uses one of them, with its private key:
Thanks @sebastianteres!!! The temporary solution works perfectly!!
@sebastianteres @mmautomatizacion the issue related to the old version of openssl on MacOS is discussed and solved here : #235
@mmautomatizacion I found a quick solution (temporary). On your node_modules folder find node-opcua-pki/lib/pki/toolbox.js There you will find the function that generates the dates: x509Date
Change the following line:
To this:
That will fix the dates and work correctly on Mac. Hope it helps! 😃
I’m getting the following error on mac while running crypto_create_CA.js demo: start date is invalid, it should be YYMMDDHHMMSSZ The command dates look like this: -startdate 20161101161257Z -enddate 20171101161257Z
+1