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

本文介绍在Windows环境下使用UAdemoserver和UAexpert时遇到的安全连接问题,特别是错误'BadSecurityChecksFailed'的解决方案。文章详细解释了如何通过手动信任客户端证书来修复此问题。

开发板推荐:天空星STM32F407VET6开发板

超高性价比 STM32主控 | 超高主频 | 一板兼容百芯 | 比赛神器 | 沉金彩色丝印

背景:

在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.

create_secure_channel.png

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.
client_certificate_rejected.png

在windows中

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

拷贝****.der到

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



开发板推荐:天空星STM32F407VET6开发板

超高性价比 STM32主控 | 超高主频 | 一板兼容百芯 | 比赛神器 | 沉金彩色丝印

评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值