Auto generated certificate validity is not correct

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
manakamu
Sr. Member
Sr. Member
Posts: 10
Joined: 13 Dec 2018, 02:08

Auto generated certificate validity is not correct

Post by manakamu »

I have built UA SDK CPP for WinCE6.
The sample server(server_lesson01) works fine.
But UaExpert shows an errror about certificate validation.

Valid From 2 7 15:28:15 2106
Valid To 1 1 09:00:00 1970

Validity date is heading from the future to the past.
I think that the certificate is valid for five years from today.

I checked variables shown below at CertificateConfiguration::createCertificate.

info.validTime : 157680000
info.validFrom : 0

What do I need to check anything else?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: Auto generated certificate validity is not correct

Post by Support Team »

Hello manakamu,

did you check the clock on the device - is it set to the current time correctly?
Best regards
Unified Automation Support Team

manakamu
Sr. Member
Sr. Member
Posts: 10
Joined: 13 Dec 2018, 02:08

Re: Auto generated certificate validity is not correct

Post by manakamu »

I found that OpenSSL function(BIO_snprintf) is not working properly.
BIO_snprintf is used to set the validity date.
I could not understand the reason, but I solved it by replacing BIO_snprintf implmentation with _snprintf.

Post Reply