INFO:asyncua.client.ua_client.UaClient:opening connection
WARNING:asyncua.uaprotocol:updating client limits to: TransportLimits(max_recv_buffer=65536, max_send_buffer=65536, max_chunk_count=256, max_message_size=16777216)
INFO:asyncua.client.ua_client.UASocketProtocol:open_secure_channel
INFO:asyncua.client.ua_client.UASocketProtocol:close_secure_channel
INFO:asyncua.client.ua_client.UASocketProtocol:Request to close socket received
INFO:asyncua.client.client:find_endpoint [EndpointDescription(EndpointUrl='opc.tcp://axc-f-2152-1:4840', Server=ApplicationDescription(ApplicationUri='urn:axc-f-2152-1:PhoenixContact:eUAServer', ProductUri='urn:PhoenixContact:eUAServer', ApplicationName=LocalizedText(Locale='en', Text='eUAServer@axc-f-2152-1'), ApplicationType_=<ApplicationType.Server: 0>, GatewayServerUri=None, DiscoveryProfileUri=None, DiscoveryUrls=['opc.tcp://axc-f-2152-1:4840']), ServerCertificate=b'0\x82\x03\xc10\x82\x02\xa9\xa0\x03\x02\x01\x02\x02\x08O\xccC\x99\'t\x11\x140\r\x06\t*\x86H\x86\xf7\r\x01\x01\x0b\x05\x000!1\x1f0\x1d\x06\x03U\x04\x03\x0c\x16eUAServer@axc-f-2152-10"\x18\x0f20171013000000Z\x18\x0f99991231235959Z0!1\x1f0\x1d\x06\x03U\x04\x03\x0c\x16eUAServer@axc-f-2152-10\x82\x01"0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03\x82\x01\x0f\x000\x82\x01\n\x02\x82\x01\x01\x00\xe8\xaeWxX\x9f\x0c\xd6\xb5R\xba\xce\xb4\xeb\x0e\x01@IPR\xa4\x90\x12P\xf3\xd3\x88\xca\xc3\xf2\x7fo\x1f `\xca\x87\x9a\x87\xfa\x0cn\xd4\xdc&j\x91G\xb5\xc7g\xf2\x8d\xc1Y7\xfc\xed\x85\xa0wo,\x8c\x84\xe0,\x0b \xca\xddg\x1f\xed65\xa6~\xd0\xc2\x0f\xa3\xbfy2\xa2Y\xc0\xa0\x9aw,?\xb8\xb6\xa8\xf9\xa8\xd1f&$\xd5\n\xdd\xe8B\x97\xa5\xa6\xe3q\xf6\x8em\x99\xb6\xe1\xae\xb6\x0c}\xe4\xa5\xc6\x08(\xab\x08\xda1T\xe1\xfcV\xe7\xb6cy\x0euD&]X\x02\x91\x9c`F:\x0f\r\x84HB\xac\xb9\xd7\xf5L\xcb\x05\xfdKb\x8f{\x11\xd2\t\x8d\t)\r\x18\xe8\xb3\xbd8p>Y\x07e\x15\xd5\xd6\x89S\x8b\n\xe7S\x18 \xa5\xc2k\xebY\xc9\xcc\x840\xe9\xa0Oi\xe2}0p\xf3\x87\xaa4\x199C\\*\xe5\x83%\xbe\xea\x94\xe2\xe4c\x92\x8bw\x8cOe\xdd\xab\x18\x1e\x8e\xce\r\x97Q\x9a\xf6\xb0\x83\x10\xd6l\xc2\xf9\xc9\x02\x03\x01\x00\x01\xa3\x81\xf80\x81\xf50\x0c\x06\x03U\x1d\x13\x01\x01\xff\x04\x020\x000\x1d\x06\x03U\x1d\x0e\x04\x16\x04\x14\x0c-\xc5\x93\x8fpUmK\x85\x8e\\\x93\x88\x06\x89\x16\xbc\xd4\xdc0P\x06\x03U\x1d#\x04I0G\x80\x14\x0c-\xc5\x93\x8fpUmK\x85\x8e\\\x93\x88\x06\x89\x16\xbc\xd4\xdc\xa1%\xa4#0!1\x1f0\x1d\x06\x03U\x04\x03\x0c\x16eUAServer@axc-f-2152-1\x82\x08O\xccC\x99\'t\x11\x140\x0e\x06\x03U\x1d\x0f\x01\x01\xff\x04\x04\x03\x02\x02\xf40 \x06\x03U\x1d%\x01\x01\xff\x04\x160\x14\x06\x08+\x06\x01\x05\x05\x07\x03\x01\x06\x08+\x06\x01\x05\x05\x07\x03\x020B\x06\x03U\x1d\x11\x04;09\x86)urn:axc-f-2152-1:PhoenixContact:eUAServer\x82\x0caxc-f-2152-10\r\x06\t*\x86H\x86\xf7\r\x01\x01\x0b\x05\x00\x03\x82\x01\x01\x00\xe6\\\xcf\xd7\x0f\xa1\xbf\xd2\x82\xe3u\xd7\x8b\x96,\xc4\xf3s\xe1\xb5\xc5\x906\xf8\x07\xf3\xa1B>\x97\xff8\xa6i3t|j\x9c\x96\x0c\xc62\x10\x0f\xc8\x13\xae\x16}+0\xdb\xf36Z\xcd\xa2\x95\xc5c`\xaa\x05\xd3sX\x83%\x9d\xa0G\'m|\xb8\xd4\xf7.f\x86\x1f\x07G7\xdac\xde\x075\x17o\rA\xd6)&\x80$\xeb\x0b\x11\x0c\xe5\xbb\x8f1\xb0\x17\xff\xfb\x871\xe8\xdf3\x1c\xb4\x04\x86\x90\x87:\x98\xe0\xbe\x9esUJ\xf2}h\xa2rz1\x0f]\x17C\x00&\xa7\xfc\xd54\xa0\xa3#*\x95\xd3\xca\xda\x89Jw\x18\xe1\x99\xb1>\x13yF\x18I\x11\xed\xbb\x14@yq\xda,=KY\xd1\xd3OcY\xdb\xb8\xfb\xbf*\xd2@a+\x16\x1bo\n\x05\xf0\x00\x9dJ$;\xda\xa2\x02F\xed;.\x12\xb7\x97\xc1\x8f!\xc0\xe5\xdc\x86\xea4\xf5\xd6L~\xe9o\xf1}\xc5\xb9\xbb\xb7\x1c\x9f\xdb\x08\xed\xdau\x8ab\xd9\xc0\x85\xbb\xc1\xf2\x97\x05sE\xbc', SecurityMode=<MessageSecurityMode.Sign: 2>, SecurityPolicyUri='http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256', UserIdentityTokens=[UserTokenPolicy(PolicyId='UserName-[0]-Sign-Basic256Sha256', TokenType=<UserTokenType.UserName: 1>, IssuedTokenType=None, IssuerEndpointUrl=None, SecurityPolicyUri='http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256')], TransportProfileUri='http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary', SecurityLevel=65), EndpointDescription(EndpointUrl='opc.tcp://axc-f-2152-1:4840', Server=ApplicationDescription(ApplicationUri='urn:axc-f-2152-1:PhoenixContact:eUAServer', ProductUri='urn:PhoenixContact:eUAServer', ApplicationName=LocalizedText(Locale='en', Text='eUAServer@axc-f-2152-1'), ApplicationType_=<ApplicationType.Server: 0>, GatewayServerUri=None, DiscoveryProfileUri=None, DiscoveryUrls=['opc.tcp://axc-f-2152-1:4840']), ServerCertificate=b'0\x82\x03\xc10\x82\x02\xa9\xa0\x03\x02\x01\x02\x02\x08O\xccC\x99\'t\x11\x140\r\x06\t*\x86H\x86\xf7\r\x01\x01\x0b\x05\x000!1\x1f0\x1d\x06\x03U\x04\x03\x0c\x16eUAServer@axc-f-2152-10"\x18\x0f20171013000000Z\x18\x0f99991231235959Z0!1\x1f0\x1d\x06\x03U\x04\x03\x0c\x16eUAServer@axc-f-2152-10\x82\x01"0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03\x82\x01\x0f\x000\x82\x01\n\x02\x82\x01\x01\x00\xe8\xaeWxX\x9f\x0c\xd6\xb5R\xba\xce\xb4\xeb\x0e\x01@IPR\xa4\x90\x12P\xf3\xd3\x88\xca\xc3\xf2\x7fo\x1f `\xca\x87\x9a\x87\xfa\x0cn\xd4\xdc&j\x91G\xb5\xc7g\xf2\x8d\xc1Y7\xfc\xed\x85\xa0wo,\x8c\x84\xe0,\x0b \xca\xddg\x1f\xed65\xa6~\xd0\xc2\x0f\xa3\xbfy2\xa2Y\xc0\xa0\x9aw,?\xb8\xb6\xa8\xf9\xa8\xd1f&$\xd5\n\xdd\xe8B\x97\xa5\xa6\xe3q\xf6\x8em\x99\xb6\xe1\xae\xb6\x0c}\xe4\xa5\xc6\x08(\xab\x08\xda1T\xe1\xfcV\xe7\xb6cy\x0euD&]X\x02\x91\x9c`F:\x0f\r\x84HB\xac\xb9\xd7\xf5L\xcb\x05\xfdKb\x8f{\x11\xd2\t\x8d\t)\r\x18\xe8\xb3\xbd8p>Y\x07e\x15\xd5\xd6\x89S\x8b\n\xe7S\x18 \xa5\xc2k\xebY\xc9\xcc\x840\xe9\xa0Oi\xe2}0p\xf3\x87\xaa4\x199C\\*\xe5\x83%\xbe\xea\x94\xe2\xe4c\x92\x8bw\x8cOe\xdd\xab\x18\x1e\x8e\xce\r\x97Q\x9a\xf6\xb0\x83\x10\xd6l\xc2\xf9\xc9\x02\x03\x01\x00\x01\xa3\x81\xf80\x81\xf50\x0c\x06\x03U\x1d\x13\x01\x01\xff\x04\x020\x000\x1d\x06\x03U\x1d\x0e\x04\x16\x04\x14\x0c-\xc5\x93\x8fpUmK\x85\x8e\\\x93\x88\x06\x89\x16\xbc\xd4\xdc0P\x06\x03U\x1d#\x04I0G\x80\x14\x0c-\xc5\x93\x8fpUmK\x85\x8e\\\x93\x88\x06\x89\x16\xbc\xd4\xdc\xa1%\xa4#0!1\x1f0\x1d\x06\x03U\x04\x03\x0c\x16eUAServer@axc-f-2152-1\x82\x08O\xccC\x99\'t\x11\x140\x0e\x06\x03U\x1d\x0f\x01\x01\xff\x04\x04\x03\x02\x02\xf40 \x06\x03U\x1d%\x01\x01\xff\x04\x160\x14\x06\x08+\x06\x01\x05\x05\x07\x03\x01\x06\x08+\x06\x01\x05\x05\x07\x03\x020B\x06\x03U\x1d\x11\x04;09\x86)urn:axc-f-2152-1:PhoenixContact:eUAServer\x82\x0caxc-f-2152-10\r\x06\t*\x86H\x86\xf7\r\x01\x01\x0b\x05\x00\x03\x82\x01\x01\x00\xe6\\\xcf\xd7\x0f\xa1\xbf\xd2\x82\xe3u\xd7\x8b\x96,\xc4\xf3s\xe1\xb5\xc5\x906\xf8\x07\xf3\xa1B>\x97\xff8\xa6i3t|j\x9c\x96\x0c\xc62\x10\x0f\xc8\x13\xae\x16}+0\xdb\xf36Z\xcd\xa2\x95\xc5c`\xaa\x05\xd3sX\x83%\x9d\xa0G\'m|\xb8\xd4\xf7.f\x86\x1f\x07G7\xdac\xde\x075\x17o\rA\xd6)&\x80$\xeb\x0b\x11\x0c\xe5\xbb\x8f1\xb0\x17\xff\xfb\x871\xe8\xdf3\x1c\xb4\x04\x86\x90\x87:\x98\xe0\xbe\x9esUJ\xf2}h\xa2rz1\x0f]\x17C\x00&\xa7\xfc\xd54\xa0\xa3#*\x95\xd3\xca\xda\x89Jw\x18\xe1\x99\xb1>\x13yF\x18I\x11\xed\xbb\x14@yq\xda,=KY\xd1\xd3OcY\xdb\xb8\xfb\xbf*\xd2@a+\x16\x1bo\n\x05\xf0\x00\x9dJ$;\xda\xa2\x02F\xed;.\x12\xb7\x97\xc1\x8f!\xc0\xe5\xdc\x86\xea4\xf5\xd6L~\xe9o\xf1}\xc5\xb9\xbb\xb7\x1c\x9f\xdb\x08\xed\xdau\x8ab\xd9\xc0\x85\xbb\xc1\xf2\x97\x05sE\xbc', SecurityMode=<MessageSecurityMode.SignAndEncrypt: 3>, SecurityPolicyUri='http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256', UserIdentityTokens=[UserTokenPolicy(PolicyId='UserName-[0]-SignAndEncrypt-Basic256Sha256', TokenType=<UserTokenType.UserName: 1>, IssuedTokenType=None, IssuerEndpointUrl=None, SecurityPolicyUri='http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256')], TransportProfileUri='http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary', SecurityLevel=115)] <MessageSecurityMode.SignAndEncrypt: 3> 'http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256'
INFO:asyncua.client.ua_client.UASocketProtocol:Socket has closed connection
Traceback (most recent call last):
  File "/etc/openhab2/scripts/OPC/e.py", line 47, in <module>
    main()
  File "/etc/openhab2/scripts/OPC/e.py", line 42, in main
    loop.run_until_complete(task(loop))
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/etc/openhab2/scripts/OPC/e.py", line 25, in task
    await client.set_security(
  File "/usr/local/lib/python3.9/dist-packages/asyncua/client/client.py", line 187, in set_security
    return await self._set_security(policy, certificate, private_key, server_certificate, mode)
  File "/usr/local/lib/python3.9/dist-packages/asyncua/client/client.py", line 200, in _set_security
    cert = await uacrypto.load_certificate(certificate.path, certificate.extension)
  File "/usr/local/lib/python3.9/dist-packages/asyncua/crypto/uacrypto.py", line 31, in load_certificate
    return x509.load_der_x509_certificate(await f.read(), default_backend())
  File "/usr/lib/python3/dist-packages/cryptography/x509/base.py", line 77, in load_der_x509_certificate
    return backend.load_der_x509_certificate(data)
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/backend.py", line 1385, in load_der_x509_certificate
    raise ValueError("Unable to load certificate")
ValueError: Unable to load certificate
