Unable to find the right connection settings #1853
-
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
maybe post your simplified client code? |
Beta Was this translation helpful? Give feedback.
-
this is one of my attempts:
The error in this example is that the set_security expects certificate and key, but I don't have one. How can I combine SecurityPolicyBasic256Sha256, SignAndEncrypt and Anonymous? |
Beta Was this translation helpful? Give feedback.
-
You need certificates to use any ScruityPolicy other than None. |
Beta Was this translation helpful? Give feedback.
-
But how does UAexpert works without certificates. Is this a missing configuration combination of asyncua? |
Beta Was this translation helpful? Give feedback.
-
Here the log of UAexpert:
Maybe this helps to find the required settings in asyncua. |
Beta Was this translation helpful? Give feedback.
-
No it works. I found the used certificate and key of UAexpert in the following folder of my Windows machine: C:\Users\{username}\AppData\Roaming\unifiedautomation\uaexpert\PKI\own. It is important that the application_uri fits to a subjectAltName entry of the certificate
It is also possible to create a new certificate and key with openssl on the client which runs the script, but I don't find the right command to create a certficate with all required fields. If someone has the right command, please extend. Thank you for the support. |
Beta Was this translation helpful? Give feedback.
You can create a matching certificate with asyncua, see example:
https://github.com/FreeOpcUa/opcua-asyncio/blob/master/examples/client-with-encryption.py