Remove certificate control|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Remove certificate control
Avatar
Alberto Freguglia
Member
Members
Forum Posts: 3
Member Since:
03/14/2022
sp_UserOfflineSmall Offline
1
11/29/2022 - 05:18
sp_Permalink sp_Print

Hi, 

I have a internal network and i don’t work with certificates.
The server Weintek is set without certificate.
When i create a session client, vb.net return this exception.

ServiceResultException: Certificate is not trusted.
SubjectName: CN=UaServer@cMT-D504, OU=Unit, O=Organization, L=LocationName, C=TW, DC=cMT-D504
IssuerName: CN=UaServer@cMT-D504, OU=Unit, O=Organization, L=LocationName, C=TW, DC=cMT-D504

How force this exception?
In the future we will implement the certificate but today i need to tests without them.

If anyone can help me, thanks

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
11/29/2022 - 14:53
sp_Permalink sp_Print sp_EditHistory

You need to select the correct security policy when you connect. If you are using a library to connect to the OPC UA server it likely has logic to automatically select the best security. Youto need to pass parameters to the API that tell it to use no security.

Avatar
Alberto Freguglia
Member
Members
Forum Posts: 3
Member Since:
03/14/2022
sp_UserOfflineSmall Offline
3
11/30/2022 - 00:13
sp_Permalink sp_Print

Thanks for the answer,

but this is a problem, i dont’ t know how implementing this Api.

I use vb.net and error is in :

Session = Session.Create(AppOpcConf, Endpoint, False, AppOpcConf.ApplicationName, CUInt(AppOpcConf.ClientConfiguration.DefaultSessionTimeout), New UserIdentity(), Nothing).Result

The library are of the OPC foundation.

I have try to use AppOpcConf.SecurityConfiguration.AutoAcceptUntrustedCertificates = True, but not works.

I found SecurityPolicy object in opc-ua library, but im not be able to set correctly.

If you have some ideas… thanks

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
11/30/2022 - 06:57
sp_Permalink sp_Print

I suggest you use the C# examples:

https://github.com/OPCFoundati…..enceClient

and

https://github.com/OPCFoundati…..les/Client

Note that there is no such thing as a secure internal network. Threats can come from anywhere.

In particular, you need certificates to protect passwords even if you turn connection security off.

So you need to learn how to manage security with your application even if you do your initial development without security.

Avatar
Alberto Freguglia
Member
Members
Forum Posts: 3
Member Since:
03/14/2022
sp_UserOfflineSmall Offline
5
12/06/2022 - 02:12
sp_Permalink sp_Print sp_EditHistory

Thanks Randy,

I’ve implemented a certificate.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 29
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4889