关于OPCUA 协议 Bad Certificate Untrusted问题的解决

背景:

在windows环境下运行UA demo server 和 UAexpert

https://www.unified-automation.com/downloads/opc-ua-development.html

https://www.unified-automation.com/downloads/opc-ua-clients.html

在建立安全连接时,出现

15:47:44.164 | Server Node        | UaServerCpp@coolwaterld-DP ... | Connecting failed with error 'BadSecurityChecksFailed'
15:47:44.164 | Server Node        | UaServerCpp@coolwaterld-DP ... | Error 'BadSecurityChecksFailed' was returned during OpenSecureChannel
15:47:44.139 | Server Node        | UaServerCpp@coolwaterld-DP ... | Used UserTokenType: Anonymous
15:47:44.139 | Server Node        | UaServerCpp@coolwaterld-DP ... | ApplicationUri: 'urn:coolwaterld-DP:UnifiedAutomation:UaServerCpp'
15:47:44.139 | Server Node        | UaServerCpp@coolwaterld-DP ... | Security policy: 'http://opcfoundation.org/UA/SecurityPolicy#Basic256'
15:47:44.139 | Server Node        | UaServerCpp@coolwaterld-DP ... | Endpoint: 'opc.tcp://coolwaterld-DP:48010'


表示需要服务器信任客户端

http://documentation.unified-automation.com/uasdkcpp/1.5.2/html/L2UaDiscoveryConnect.html

the client can attempt to create a secure channel with the server, sending along its Application Instance Certificate (including the public key of the client). This first connection attempt will be rejected, because the server doesn’t trust the client yet.

关于OPCUA 协议 Bad Certificate Untrusted问题的解决_第1张图片

Trusting the client’s certificate is a manual step on the server. Usually, a server administrator has to move the client certificate from the list of rejected to the list of trusted certificates.
关于OPCUA 协议 Bad Certificate Untrusted问题的解决_第2张图片

在windows中

C:\ProgramData\UnifiedAutomation\UaSdkCppBundleEval\pkiserver\rejected

拷贝****.der到

C:\ProgramData\UnifiedAutomation\UaSdkCppBundleEval\pkiserver\trusted\certs



你可能感兴趣的:(OPCUA,OPCUA)