Server Certificate change
Posted: 02 Mar 2023, 16:27
Hi,
I'm trying to get my client to properly reconnect, after I change the servers TLS Key and Certificate.
I'm shutting down the server, exchange the key and certificate and then start it again.
My client gets a UaSessionCallback::connectError with error = OpcUa_BadCertificateInvalid, which is OK.
Now I want my client to check the new certificate and connect again.
For this I'm setting a flag, check this flag outside the callback and if it is set I'm deleting the current session to create a new one.
But my client always gets stuck in the delete of the current session, or if I disconnect the session before, it gets stuck in the disconnect.
Can anybody give me an advice how to handle this properly?
Thanks,
Thomas
I'm trying to get my client to properly reconnect, after I change the servers TLS Key and Certificate.
I'm shutting down the server, exchange the key and certificate and then start it again.
My client gets a UaSessionCallback::connectError with error = OpcUa_BadCertificateInvalid, which is OK.
Now I want my client to check the new certificate and connect again.
For this I'm setting a flag, check this flag outside the callback and if it is set I'm deleting the current session to create a new one.
But my client always gets stuck in the delete of the current session, or if I disconnect the session before, it gets stuck in the disconnect.
Can anybody give me an advice how to handle this properly?
Thanks,
Thomas