Hello,
I have C++ Client configured to initially reject a server's certificate. The client closely copies the sdk client example.
What is the code to save the server certificate in the client's reject folder, so that after it is manually moved to trusted the connection will succeed the next time?
Kind Regards and Thank you in advance!
how to make client store a rejected server certificate
Moderator: uasdkcpp
-
- Jr. Member
- Posts: 2
- Joined: 25 May 2015, 18:02
-
- Jr. Member
- Posts: 2
- Joined: 25 May 2015, 18:02
- Support Team
- Hero Member
- Posts: 3069
- Joined: 18 Mar 2011, 15:09
Re: how to make client store a rejected server certificate
Please do not ask questions to the support and post the same questions here in the forum in parallel.
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Jr. Member
- Posts: 2
- Joined: 14 Sep 2017, 19:42
Re: how to make client store a rejected server certificate
Hello,
it would be great if you post the solution here.
Thanks a lot
it would be great if you post the solution here.
Thanks a lot
- Support Team
- Hero Member
- Posts: 3069
- Joined: 18 Mar 2011, 15:09
Re: how to make client store a rejected server certificate
First of all you need to get the certificate from the server. ClientLesson 4 shows how that can be done (See method connectSecure() - GetEndpoints).
To save a certificate to a file you can use UaPkiCertificate::toDERFile(filename) and save it to any location you like.
To save a certificate to a file you can use UaPkiCertificate::toDERFile(filename) and save it to any location you like.
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Jr. Member
- Posts: 2
- Joined: 14 Sep 2017, 19:42
Re: how to make client store a rejected server certificate
Thank you very much!
For the Filename we use thumbPrint().toHex() from UaPkiCertificate.
For the Filename we use thumbPrint().toHex() from UaPkiCertificate.