ycdch 2022-12-01 17:47 采纳率: 0%
浏览 458
已结题

opc-62541库的密码登录和加密连接问题

oepn62541库开发opc ua 的客户端;密码登录和加密登录都未通过(UaExpert测试能通过)

网上的一般例子运行情况:https://wanghao1314.blog.csdn.net/article/details/104713548

```c
[2022-11-21 02:26:28.000 (UTC-0500)] warn/userland      AcceptAll Certificate Verification. Any remote certificate will be accepted.
[2022-11-21 02:26:28.000 (UTC-0500)] info/securitypolicy        The Basic128Rsa15 security policy with openssl is added.
[2022-11-21 02:26:28.000 (UTC-0500)] info/securitypolicy        The basic256 security policy with openssl is added.
[2022-11-21 02:26:28.001 (UTC-0500)] info/securitypolicy        The basic256sha256 security policy with openssl is added.
[2022-11-21 02:26:28.001 (UTC-0500)] info/securitypolicy        The Aes128Sha256RsaOaep security policy with openssl is added.
[2022-11-21 02:26:28.001 (UTC-0500)] warn/client        The configured ApplicationURI does not match the URI specified in the certificate for the SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#None
[2022-11-21 02:26:28.001 (UTC-0500)] warn/client        The configured ApplicationURI does not match the URI specified in the certificate for the SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15
[2022-11-21 02:26:28.001 (UTC-0500)] warn/client        The configured ApplicationURI does not match the URI specified in the certificate for the SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#Basic256
[2022-11-21 02:26:28.001 (UTC-0500)] warn/client        The configured ApplicationURI does not match the URI specified in the certificate for the SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256
[2022-11-21 02:26:28.001 (UTC-0500)] warn/client        The configured ApplicationURI does not match the URI specified in the certificate for the SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#Aes128_Sha256_RsaOaep
[2022-11-21 02:26:28.007 (UTC-0500)] info/channel       Connection 3 | SecureChannel 3786802061 | SecureChannel opened with SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#None and a revised lifetime of 600.00s
[2022-11-21 02:26:28.007 (UTC-0500)] info/client        Client Status: ChannelState: Open, SessionState: Closed, ConnectStatus: Good
[2022-11-21 02:26:28.010 (UTC-0500)] info/client        Rejecting endpoint 0: security mode doesn't match
[2022-11-21 02:26:28.010 (UTC-0500)] info/client        Rejecting endpoint 1: security mode doesn't match
[2022-11-21 02:26:28.010 (UTC-0500)] info/client        Rejecting endpoint 2: security mode doesn't match
[2022-11-21 02:26:28.011 (UTC-0500)] error/client       No suitable endpoint found
[2022-11-21 02:26:28.011 (UTC-0500)] info/client        Client Status: ChannelState: Closed, SessionState: Closed, ConnectStatus: BadInternalError

```

c语言版本的;来个相关示例代码(客户端的),并详细说下当前原因(密码登录和加密登录2种)
网上的链接基本上都试过了,未通过:


https://blog.csdn.net/whahu1989/article/details/103212001
谢谢朋友们的回答,不过国内和国外大部分链接都翻过了,未测试通过。。。。有测试通过的可以直接上示例代码

  • 写回答

5条回答 默认 最新

  • BsonJ 2022-12-01 21:53
    关注

    这价~666

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 12月5日
  • 提问应符合社区要求 12月4日
  • 修改了问题 12月3日
  • 赞助了问题酬金100元 12月2日
  • 展开全部