mikakaraila / node-red-contrib-opcua

A Node-RED node to communicate OPC UA. Uses node-opcua library.
Other
217 stars 197 forks source link

The local certificate file option is invalid #742

Closed dingling1990 closed 4 weeks ago

dingling1990 commented 1 month ago

I am using the local certificate file option, which will automatically generate its own certificate instead of using the local certificate,Is there something I set wrong? Looking forward to your reply

image image

image

mikakaraila commented 1 month ago

Try to use / instead of \

dingling1990 commented 1 month ago

尝试使用 / 代替 \

I changed it/ but it still doesn't work. I still use the default certificate. I can get the data after adding trust to the server.

If the file is wrong, there will be a prompt that pem is not found. Is there another problem?

mikakaraila commented 1 month ago

Can you put here some log/console output? Otherwise I am blind and trying to guess problem.

Eldarion85 commented 1 month ago

I thought there was no longer an option to specify the path to the certificate? Even in the field it says that it is no longer used. I also use my own PKI and if the certificates are in the right folder, it works perfectly.

image

dingling1990 commented 1 month ago

Can you put here some log/console output? Otherwise I am blind and trying to guess problem.

Use Local certificate ,The generated one is NodeOPCUAClient, Log/console output as shown

image

dingling1990 commented 1 month ago

I thought there was no longer an option to specify the path to the certificate? Even in the field it says that it is no longer used. I also use my own PKI and if the certificates are in the right folder, it works perfectly.

HI Use Local certificate ,The generated one is NodeOPCUAClient,Can you tell me your PKI configuration path? tks image

Eldarion85 commented 1 month ago

Hi, I used to use my own path for the certificates until it just stopped working. You can read about it in the issues: https://github.com/mikakaraila/node-red-contrib-opcua/issues/577 https://github.com/node-opcua/node-opcua-crypto/issues/21 https://github.com/mikakaraila/node-red-contrib-opcua/issues/664

In any case, the result was that you can no longer specify your own path, but a fixed directory is used. I don't know if this will help you, but in my Debian Linux the certificates have to be in the folder: /home/YOURUSER/.config/node-opcua-default-nodejs/PKI

image

mikakaraila commented 1 month ago

I expect his has changed as certificate manager was taken into use. I will fix dialog text (no code changes).

mikakaraila commented 1 month ago

Fix to dialog: Path is not used anymore! Example: selfSigned.pem Path is not used anymore! Example: private_key.pem

Info text: Client will try to load server certificate from endpoint if server can provide it, copy server certificate under pki folder: USER-HOME-FOLDER/.config/node-opcua-default-nodejs/PKI/ Local file must be above folder and certificate filename can be then used to use server certificate (.pem ending file).

mikakaraila commented 4 weeks ago

Check with latest version 0.2.337