**我正在尝试用WinCC &Encrpyt连接已启用Basic256Sha256的OPCUA服务器。
如何在WinCC上/从WinCC中生成/获取.pem文件,从WinCC中生成.pem文件?
WinCC EC2服务器部署在EC2实例上。**
将用于连接到WinCC OPC服务器的客户端连接代码是什么,该服务器启用了带有标志和Encrpyt的Basic256Sha256。?
我需要.der文件和我的客户端的.pem文件。
如何生成.der文件和.pem文件?
生成文件后,是否需要将文件保存在WinCC OPC服务器和OPC客户端上?
代码1:
client = Client("opc.tcp://localhost:4840/freeopcua/server/")
#client = Client("opc.tcp://localhost:53530/OPCUA/SimulationServer/")
client.set_security_string("Basic128rsa15 ,SignAndEncrypt,certificate-example.der,private-key-
example.pem")
client.application_uri = "urn:example.org:FreeOpcUa:python-opcua"
client.secure_channel_timeout = 10000
client.session_timeout = 10000代码2:
logging.basicConfig(level=logging.WARN)
client = Client("opc.tcp://localhost:53530/OPCUA/SimulationServer/")
client.load_client_certificate("server_cert.pem")
client.load_private_key("mykey.pem")代码3:
client = Client("opc.tcp://localhost:53530/OPCUA/SimulationServer/") client.set_security_string("Basic128rsa15,签名,证书-example.der,私钥-example.pem“)
发布于 2020-05-12 15:14:23
只需猜测WinCC的版本(假设为7.X) .der文件:
C:\程序文件(x86)\Siemens\WinCC\opc\UAServer\PKI\CA\certs
您可以使用文件管理器手动移动python客户端的拒绝证书。WINCC服务器使用的证书存储在"OpcUaServerWinCC.xml“配置文件中的设置中:
(x86)\Siemens\WinCC\opc\UAServer\OpcUaServerWinCC.xml
C:\Program
特定于项目的配置文件存储在WinCC项目文件夹中:
\opc\UAServer“
是的,证书必须在任何时候都是有效的。同时,由于安全机制的影响,时间同步是非常重要的。
可以在WinCC安装帮助文件中找到WinCC OPC UA的配置,查找“接口-> OPC -打开连接-> WinCC OPC服务器”和客户端“通信--> OPC wincc通道”。
这是会让您开始使用的东西,还是您没有使用wincc 7?
https://stackoverflow.com/questions/61750820
复制相似问题