Closed jgentes closed 4 years ago
I just ran into the same issue. It looks like the referenced variable does not exist, so none of the -P or -s options work.
Update; I found that when I use values that are valid according to the node-opcua-client library (included below), it does work. There is, however, an error in the creation of the error message - funnily enough :P
opcua.MessageSecurityMode
{
'0': 'Invalid',
'1': 'None',
'2': 'Sign',
'3': 'SignAndEncrypt',
Invalid: 0,
None: 1,
Sign: 2,
SignAndEncrypt: 3
}
opcua.SecurityPolicy
{
Invalid: 'invalid',
None: 'http://opcfoundation.org/UA/SecurityPolicy#None',
Basic128: 'http://opcfoundation.org/UA/SecurityPolicy#Basic128',
Basic128Rsa15: 'http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15',
Basic192: 'http://opcfoundation.org/UA/SecurityPolicy#Basic192',
Basic192Rsa15: 'http://opcfoundation.org/UA/SecurityPolicy#Basic192Rsa15',
Basic256: 'http://opcfoundation.org/UA/SecurityPolicy#Basic256',
Basic256Rsa15: 'http://opcfoundation.org/UA/SecurityPolicy#Basic256Rsa15',
Basic256Sha256: 'http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256',
Aes128_Sha256_RsaOaep: 'http://opcfoundation.org/UA/SecurityPolicy#Aes128_Sha256_RsaOaep',
PubSub_Aes128_CTR: 'http://opcfoundation.org/UA/SecurityPolicy#PubSub_Aes128_CTR',
PubSub_Aes256_CTR: 'http://opcfoundation.org/UA/SecurityPolicy#PubSub_Aes256_CTR'
}
might differ on your specific release.
you now need to run
opcua-commander -e opc.tcp://localhost:62541 -u opcuauser -p opcuauser -P=Basic256Sha256 -s SignAndEncrypt
note SIGNANDENCRYPT
-> SignAndEncrypt
When I run
opcua-commander -e opc.tcp://localhost:62541 -u opcuauser -p opcuauser -P=Basic256Sha256 -s SIGNANDENCRYPT
I get the error:I've tried
Basic128Rsa15
as well. I'm connecting to a fresh Ignition OPC-UA server and I may not have it configured correctly, however this looks like a bug in opcua-commander unless I have the syntax incorrect.Node version == 8.15.1