Describe the bug
I am using the sync wrapper. Whenever i try to connect to an OPC UA Server with a certificate that the server is not trusting the Exception exceptions.TimeoutError is being raised.
I expected that some better exception would be raised, e.g. BadCertificateUntrusted exception.
asyncua.uaprotocol log gives
[WARNING] (asyncua.uaprotocol): Received an error: ErrorMessage(Error=StatusCode(value=2148728832), Reason=None)
The OPC UA Error Codes list says that 2148728832 is BadSecurityChecksFailed. So the library is identifying the issue correctly, but it seems that the sync wrapper is not passing this exception.
To Reproduce
try to connect to an OPC UA server whith an untrusted certificate.
from asyncua.sync import Client
opcua_client = Client(self.opcua_address)
opcua_client.set_security_string("Basic256Sha256,SignAndEncrypt,pubkey.der,privkey.pem")
opcua_client.connect()
Expected behavior
Not to raise TimeoutError but raise something like BadCertificateUntrusted
Version
Python-Version:3.8.12
opcua-asyncio Version master branch, 1.0.1
Describe the bug
I am using the sync wrapper. Whenever i try to connect to an OPC UA Server with a certificate that the server is not trusting the Exception exceptions.TimeoutError is being raised.
I expected that some better exception would be raised, e.g. BadCertificateUntrusted exception.
asyncua.uaprotocol log gives
[WARNING] (asyncua.uaprotocol): Received an error: ErrorMessage(Error=StatusCode(value=2148728832), Reason=None)
The OPC UA Error Codes list says that 2148728832 is BadSecurityChecksFailed. So the library is identifying the issue correctly, but it seems that the sync wrapper is not passing this exception.
To Reproduce
try to connect to an OPC UA server whith an untrusted certificate.
Expected behavior
Not to raise TimeoutError but raise something like BadCertificateUntrusted
Version
Python-Version:3.8.12
opcua-asyncio Version master branch, 1.0.1