The following known-working code may help you. It sets a certificates
validity to from yesterday to a year from yesterday.
ASN1_UTCTIME *s=ASN1_UTCTIME_new();
X509_gmtime_adj(s, -60*60*24);
X509_set_notBefore(cert, s);
X509_gmtime_adj(s, 60*60*24*364);
X509_set_notAfter(cert, s)
thanks for your response, yes i have tried casting the
long value, it doesn't make any difference. i believe
Jan 1 1970 is the start of the unix calendar, so it sounds
to me like there is some kind of value overflow
somewhere.
rangeos wrote:
> Have you try to make a cast
>
> X509_gmtime_adj(X509